MCPcopy
hub / github.com/nonebot/nonebot2 / test_message

Function test_message

tests/test_permission.py:57–64  ·  view source on GitHub ↗
(type: str, expected: bool)

Source from the content-addressed store, hash-verified

55@pytest.mark.anyio
56@pytest.mark.parametrize(("type", "expected"), [("message", True), ("notice", False)])
57async def test_message(type: str, expected: bool):
58 dependent = next(iter(MESSAGE.checkers))
59 checker = dependent.call
60
61 assert isinstance(checker, Message)
62
63 event = make_fake_event(_type=type)()
64 assert await dependent(event=event) == expected
65
66
67@pytest.mark.anyio

Callers

nothing calls this directly

Calls 1

make_fake_eventFunction · 0.90

Tested by

no test coverage detected