mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-17 03:20:54 +00:00
✨ Feature: 添加插件元数据字段 type
homepage
supported_adapters
(#2012)
This commit is contained in:
@ -128,7 +128,7 @@ async def test_require_not_found():
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_plugin_metadata():
|
||||
from plugins.metadata import Config
|
||||
from plugins.metadata import Config, FakeAdapter
|
||||
|
||||
plugin = nonebot.get_plugin("metadata")
|
||||
assert plugin
|
||||
@ -137,6 +137,11 @@ async def test_plugin_metadata():
|
||||
"name": "测试插件",
|
||||
"description": "测试插件元信息",
|
||||
"usage": "无法使用",
|
||||
"type": "application",
|
||||
"homepage": "https://v2.nonebot.dev",
|
||||
"config": Config,
|
||||
"supported_adapters": {"~onebot.v11", "plugins.metadata:FakeAdapter"},
|
||||
"extra": {"author": "NoneBot"},
|
||||
}
|
||||
|
||||
assert plugin.metadata.get_supported_adapters() == {FakeAdapter}
|
||||
|
Reference in New Issue
Block a user