diff options
author | Kyomotoi <kyomotoiowo@gmail.com> | 2022-02-14 19:19:16 +0800 |
---|---|---|
committer | Kyomotoi <kyomotoiowo@gmail.com> | 2022-02-14 19:20:56 +0800 |
commit | 1e41f8453856cf1b5a2163c196a6814ef97e9f2e (patch) | |
tree | 5057902290089cebe4ed59c8bddf14cedf283f0f /test/test_plugin_applet.py | |
parent | d48a1405f7e6c476e28cc702528fb7ca87bd7f25 (diff) | |
download | ATRI-1e41f8453856cf1b5a2163c196a6814ef97e9f2e.tar.gz ATRI-1e41f8453856cf1b5a2163c196a6814ef97e9f2e.tar.bz2 ATRI-1e41f8453856cf1b5a2163c196a6814ef97e9f2e.zip |
🚚 对插件文件相关进行重命名
Diffstat (limited to 'test/test_plugin_applet.py')
-rw-r--r-- | test/test_plugin_applet.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/test_plugin_applet.py b/test/test_plugin_applet.py new file mode 100644 index 0000000..d2c0654 --- /dev/null +++ b/test/test_plugin_applet.py @@ -0,0 +1,28 @@ +import pytest +from nonebug import App + +from .utils import make_fake_message, make_fake_event + + +@pytest.mark.asyncio +async def test_bili_rich(app: App): + from ATRI.plugins.applet import bili_rich + + Message = make_fake_message() + + async with app.test_matcher(bili_rich) as ctx: + bot = ctx.create_bot() + + msg = Message("BV1Ff4y1C7YR") + event = make_fake_event(_message=msg)() + + ctx.receive_event(bot, event) + ctx.should_call_send( + event, + """ + BV1Ff4y1C7YR INFO: + Title: 【8K30fps】这可能是画质最高的Rick Roll (doge) + Link: https://b23.tv/BV1Ff4y1C7YR + """, + True, + ) |