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

Function test_request

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

Source from the content-addressed store, hash-verified

79@pytest.mark.anyio
80@pytest.mark.parametrize(("type", "expected"), [("message", False), ("request", True)])
81async def test_request(type: str, expected: bool):
82 dependent = next(iter(REQUEST.checkers))
83 checker = dependent.call
84
85 assert isinstance(checker, Request)
86
87 event = make_fake_event(_type=type)()
88 assert await dependent(event=event) == expected
89
90
91@pytest.mark.anyio

Callers

nothing calls this directly

Calls 1

make_fake_eventFunction · 0.90

Tested by

no test coverage detected