summaryrefslogtreecommitdiff
path: root/test/test_plugin_setu.py
blob: b5a7ff2bea748d0d6d8060ac77e2c58ce29e8114 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import pytest
from nonebug import App

from .utils import make_fake_message, make_fake_event


@pytest.mark.asyncio
async def test_random_setu(app: App):
    from ATRI.plugins.setu import random_setu

    Message = make_fake_message()

    async with app.test_matcher(random_setu) as ctx:
        bot = ctx.create_bot()

        msg = Message("来张涩图")
        event = make_fake_event(_message=msg)()

        ctx.receive_event(bot, event)
        ctx.should_call_send(event, "hso(发不出", False)