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

Function test_notice

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

Source from the content-addressed store, hash-verified

67@pytest.mark.anyio
68@pytest.mark.parametrize(("type", "expected"), [("message", False), ("notice", True)])
69async def test_notice(type: str, expected: bool):
70 dependent = next(iter(NOTICE.checkers))
71 checker = dependent.call
72
73 assert isinstance(checker, Notice)
74
75 event = make_fake_event(_type=type)()
76 assert await dependent(event=event) == expected
77
78
79@pytest.mark.anyio

Callers

nothing calls this directly

Calls 1

make_fake_eventFunction · 0.90

Tested by

no test coverage detected