diff --git a/tests/providers/store_test/test_store_sync.py b/tests/providers/store_test/test_store_sync.py index 9d3fdef0..0b51ee31 100644 --- a/tests/providers/store_test/test_store_sync.py +++ b/tests/providers/store_test/test_store_sync.py @@ -123,7 +123,7 @@ async def test_store_sync( "desc": "NoneBot 数据存储插件", "author": "he0119", "homepage": "https://github.com/he0119/nonebot-plugin-datastore", - "tags": [{"label": "good first plugin", "color": "#ffffff"}], + "tags": [{"label": "sync", "color": "#ffffff"}], "is_official": False, "type": "library", "supported_adapters": None, @@ -332,7 +332,7 @@ async def test_store_sync( "desc": "NoneBot 数据存储插件", "author": "he0119", "homepage": "https://github.com/he0119/nonebot-plugin-datastore", - "tags": [{"label": "good first plugin", "color": "#ffffff"}], + "tags": [{"label": "sync", "color": "#ffffff"}], "is_official": False, "type": "library", "supported_adapters": None, @@ -514,7 +514,7 @@ async def test_store_sync_validation_failed( "desc": "NoneBot 数据存储插件", "author": "he0119", "homepage": "https://github.com/he0119/nonebot-plugin-datastore", - "tags": [{"label": "good first plugin", "color": "#ffffff"}], + "tags": [{"label": "sync", "color": "#ffffff"}], "is_official": False, "type": "library", "supported_adapters": None, diff --git a/tests/providers/store_test/test_store_test.py b/tests/providers/store_test/test_store_test.py index a614481f..d562fea4 100644 --- a/tests/providers/store_test/test_store_test.py +++ b/tests/providers/store_test/test_store_test.py @@ -104,7 +104,7 @@ async def test_store_test( '[{"module_name":"~none","project_link":"","name":"None","desc":"None 驱动器","author":"yanyongyu","homepage":"/docs/advanced/driver","tags":[{"label":"sync","color":"#ffffff"}],"is_official":true,"time":"2024-10-31T13:47:14.152851Z","version":"2.4.0"},{"module_name":"~fastapi","project_link":"nonebot2[fastapi]","name":"FastAPI","desc":"FastAPI 驱动器","author":"yanyongyu","homepage":"/docs/advanced/driver","tags":[],"is_official":true,"time":"2024-10-31T13:47:14.152851Z","version":"2.4.0"},{"module_name":"~quart","project_link":"nonebot2[quart]","name":"Quart","desc":"Quart 驱动器","author":"he0119","homepage":"/docs/advanced/driver","tags":[],"is_official":true,"time":"2024-10-31T13:47:14.152851Z","version":"2.4.0"}]' ) assert mocked_store_data["plugins"].read_text(encoding="utf-8") == snapshot( - '[{"module_name":"nonebot_plugin_datastore","project_link":"nonebot-plugin-datastore","name":"数据存储","desc":"NoneBot 数据存储插件","author":"he0119","homepage":"https://github.com/he0119/nonebot-plugin-datastore","tags":[{"label":"good first plugin","color":"#ffffff"}],"is_official":false,"type":"library","supported_adapters":null,"valid":true,"time":"2024-06-20T07:53:23.524486Z","version":"1.3.0","skip_test":false},{"module_name":"nonebot_plugin_treehelp","project_link":"nonebot-plugin-treehelp","name":"帮助","desc":"获取插件帮助信息","author":"author","homepage":"https://nonebot.dev/","tags":[],"is_official":false,"type":"application","supported_adapters":null,"valid":true,"time":"2023-08-28T00:00:00.000000+08:00","version":"0.3.0","skip_test":false}]' + '[{"module_name":"nonebot_plugin_datastore","project_link":"nonebot-plugin-datastore","name":"数据存储","desc":"NoneBot 数据存储插件","author":"he0119","homepage":"https://github.com/he0119/nonebot-plugin-datastore","tags":[{"label":"sync","color":"#ffffff"}],"is_official":false,"type":"library","supported_adapters":null,"valid":true,"time":"2024-06-20T07:53:23.524486Z","version":"1.3.0","skip_test":false},{"module_name":"nonebot_plugin_treehelp","project_link":"nonebot-plugin-treehelp","name":"帮助","desc":"获取插件帮助信息","author":"author","homepage":"https://nonebot.dev/","tags":[],"is_official":false,"type":"application","supported_adapters":null,"valid":true,"time":"2023-08-28T00:00:00.000000+08:00","version":"0.3.0","skip_test":false}]' ) assert mocked_store_data["results"].read_text(encoding="utf-8") == snapshot( '{"nonebot-plugin-datastore:nonebot_plugin_datastore":{"time":"2023-06-26T22:08:18.945584+08:00","config":"","version":"1.3.0","test_env":null,"results":{"validation":true,"load":true,"metadata":true},"outputs":{"validation":null,"load":"datastore","metadata":{"name":"数据存储","description":"NoneBot 数据存储插件","usage":"请参考文档","type":"library","homepage":"https://github.com/he0119/nonebot-plugin-datastore","supported_adapters":null}}},"nonebot-plugin-treehelp:nonebot_plugin_treehelp":{"time":"2023-08-28T00:00:00.000000+08:00","config":"","version":"1.0.0","test_env":null,"results":{"load":true,"metadata":true,"validation":true},"outputs":{"load":"output","metadata":{"name":"帮助","description":"获取插件帮助信息","usage":"获取插件列表\\n/help\\n获取插件树\\n/help -t\\n/help --tree\\n获取某个插件的帮助\\n/help 插件名\\n获取某个插件的树\\n/help --tree 插件名\\n","type":"application","homepage":"https://nonebot.dev/","supported_adapters":null},"validation":null}}}' @@ -240,7 +240,7 @@ async def test_store_test_raise( '[{"module_name":"~none","project_link":"","name":"None","desc":"None 驱动器","author":"yanyongyu","homepage":"/docs/advanced/driver","tags":[{"label":"sync","color":"#ffffff"}],"is_official":true,"time":"2024-10-31T13:47:14.152851Z","version":"2.4.0"},{"module_name":"~fastapi","project_link":"nonebot2[fastapi]","name":"FastAPI","desc":"FastAPI 驱动器","author":"yanyongyu","homepage":"/docs/advanced/driver","tags":[],"is_official":true,"time":"2024-10-31T13:47:14.152851Z","version":"2.4.0"},{"module_name":"~quart","project_link":"nonebot2[quart]","name":"Quart","desc":"Quart 驱动器","author":"he0119","homepage":"/docs/advanced/driver","tags":[],"is_official":true,"time":"2024-10-31T13:47:14.152851Z","version":"2.4.0"}]' ) assert mocked_store_data["plugins"].read_text(encoding="utf-8") == snapshot( - '[{"module_name":"nonebot_plugin_datastore","project_link":"nonebot-plugin-datastore","name":"数据存储","desc":"NoneBot 数据存储插件","author":"he0119","homepage":"https://github.com/he0119/nonebot-plugin-datastore","tags":[{"label":"good first plugin","color":"#ffffff"}],"is_official":false,"type":"library","supported_adapters":null,"valid":true,"time":"2024-06-20T07:53:23.524486Z","version":"1.3.0","skip_test":false},{"module_name":"nonebot_plugin_treehelp","project_link":"nonebot-plugin-treehelp","name":"帮助","desc":"获取插件帮助信息","author":"he0119","homepage":"https://github.com/he0119/nonebot-plugin-treehelp","tags":[],"is_official":false,"type":"application","supported_adapters":null,"valid":true,"time":"2024-07-13T04:41:40.905441Z","version":"0.5.0","skip_test":false}]' + '[{"module_name":"nonebot_plugin_datastore","project_link":"nonebot-plugin-datastore","name":"数据存储","desc":"NoneBot 数据存储插件","author":"he0119","homepage":"https://github.com/he0119/nonebot-plugin-datastore","tags":[{"label":"sync","color":"#ffffff"}],"is_official":false,"type":"library","supported_adapters":null,"valid":true,"time":"2024-06-20T07:53:23.524486Z","version":"1.3.0","skip_test":false},{"module_name":"nonebot_plugin_treehelp","project_link":"nonebot-plugin-treehelp","name":"帮助","desc":"获取插件帮助信息","author":"he0119","homepage":"https://github.com/he0119/nonebot-plugin-treehelp","tags":[],"is_official":false,"type":"application","supported_adapters":null,"valid":true,"time":"2024-07-13T04:41:40.905441Z","version":"0.5.0","skip_test":false}]' ) assert mocked_store_data["results"].read_text(encoding="utf-8") == snapshot( '{"nonebot-plugin-datastore:nonebot_plugin_datastore":{"time":"2023-06-26T22:08:18.945584+08:00","config":"","version":"1.3.0","test_env":null,"results":{"validation":true,"load":true,"metadata":true},"outputs":{"validation":null,"load":"datastore","metadata":{"name":"数据存储","description":"NoneBot 数据存储插件","usage":"请参考文档","type":"library","homepage":"https://github.com/he0119/nonebot-plugin-datastore","supported_adapters":null}}},"nonebot-plugin-treehelp:nonebot_plugin_treehelp":{"time":"2023-06-26T22:20:41.833311+08:00","config":"","version":"0.3.0","test_env":null,"results":{"validation":true,"load":true,"metadata":true},"outputs":{"validation":null,"load":"treehelp","metadata":{"name":"帮助","description":"获取插件帮助信息","usage":"获取插件列表\\n/help\\n获取插件树\\n/help -t\\n/help --tree\\n获取某个插件的帮助\\n/help 插件名\\n获取某个插件的树\\n/help --tree 插件名\\n","type":"application","homepage":"https://github.com/he0119/nonebot-plugin-treehelp","supported_adapters":null}}}}' diff --git a/tests/store/store_plugins.json5 b/tests/store/store_plugins.json5 index dff05ed0..15439ec5 100644 --- a/tests/store/store_plugins.json5 +++ b/tests/store/store_plugins.json5 @@ -6,7 +6,7 @@ "author_id": 1, "tags": [ { - "label": "good first plugin", + "label": "sync", "color": "#ffffff" } ],