From b3e305cbbb2a9f1526fbc203f1f05cdfe0c06d0b Mon Sep 17 00:00:00 2001 From: felinae98 <731499577@qq.com> Date: Thu, 17 Jun 2021 13:02:28 +0800 Subject: [PATCH] add weibo test --- tests/platforms/test_weibo.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/platforms/test_weibo.py diff --git a/tests/platforms/test_weibo.py b/tests/platforms/test_weibo.py new file mode 100644 index 0000000..76fdf1b --- /dev/null +++ b/tests/platforms/test_weibo.py @@ -0,0 +1,12 @@ +import pytest +import typing +if typing.TYPE_CHECKING: + import sys + sys.path.append('./src/plugins') + import nonebot_hk_reporter + +@pytest.mark.asyncio +async def test_get_name(plugin_module: 'nonebot_hk_reporter'): + weibo = plugin_module.platform.platform_manager['weibo'] + name = await weibo.get_account_name('6279793937') + assert(name == "明日方舟Arknights")