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

Function test_metaevent

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

Source from the content-addressed store, hash-verified

93 ("type", "expected"), [("message", False), ("meta_event", True)]
94)
95async def test_metaevent(type: str, expected: bool):
96 dependent = next(iter(METAEVENT.checkers))
97 checker = dependent.call
98
99 assert isinstance(checker, MetaEvent)
100
101 event = make_fake_event(_type=type)()
102 assert await dependent(event=event) == expected
103
104
105@pytest.mark.anyio

Callers

nothing calls this directly

Calls 1

make_fake_eventFunction · 0.90

Tested by

no test coverage detected