diff options
author | Kyomotoi <0w0@imki.moe> | 2023-05-11 14:56:58 +0800 |
---|---|---|
committer | Kyomotoi <0w0@imki.moe> | 2023-05-11 14:56:58 +0800 |
commit | cf2033627b63e4a444ee8971fd05f3e88e45fe86 (patch) | |
tree | 02c7b616dc94f63888413b5b9bb23fd95b29e8b2 /test/test_plugin_kimo.py | |
parent | 546885062c1dae673fb5e31dec900a4536a2b3fa (diff) | |
download | ATRI-cf2033627b63e4a444ee8971fd05f3e88e45fe86.tar.gz ATRI-cf2033627b63e4a444ee8971fd05f3e88e45fe86.tar.bz2 ATRI-cf2033627b63e4a444ee8971fd05f3e88e45fe86.zip |
✅ 更新测试用例
Diffstat (limited to 'test/test_plugin_kimo.py')
-rw-r--r-- | test/test_plugin_kimo.py | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/test/test_plugin_kimo.py b/test/test_plugin_kimo.py deleted file mode 100644 index 46d550a..0000000 --- a/test/test_plugin_kimo.py +++ /dev/null @@ -1,42 +0,0 @@ -import pytest -from nonebug import App - -from .utils import make_fake_message, make_fake_event - - -@pytest.mark.asyncio -async def test_chat(app: App): - from ATRI.plugins.kimo import kimo - - Message = make_fake_message() - - async with app.test_matcher(kimo) as ctx: - bot = ctx.create_bot() - - msg = Message("爱你") - event = make_fake_event(_message=msg, _to_me=True)() - - ctx.receive_event(bot, event) - ctx.should_call_send(event, "是…是嘛(脸红)呐,其实咱也……", True) - - -@pytest.mark.asyncio -async def test_my_name_is(app: App): - from ATRI.plugins.kimo import my_name_is - - Message = make_fake_message() - - async with app.test_matcher(my_name_is) as ctx: - bot = ctx.create_bot() - - msg = Message("叫我") - event = make_fake_event(_message=msg, _to_me=True)() - - ctx.receive_event(bot, event) - ctx.should_call_send(event, "欧尼酱想让咱如何称呼呢!0w0", True) - - msg = Message("欧尼酱") - event = make_fake_event(_message=msg)() - - ctx.receive_event(bot, event) - ctx.should_call_send(event, "好~w 那咱以后就称呼你为欧尼酱!", True) |