We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1183781 commit 234f68cCopy full SHA for 234f68c
1 file changed
tests/test_func_dependencies.py
@@ -79,3 +79,18 @@ async def handler(num: int = Depends(original_dep)) -> web.Response:
79
resp = await client.get("/")
80
assert resp.status == 200
81
assert (await resp.json())["request"] == 2
82
+
83
84
+@pytest.mark.anyio
85
+async def test_ordinary_functions_support(
86
+ my_app: web.Application,
87
+ aiohttp_client: ClientGenerator,
88
+) -> None:
89
+ async def handler(request: web.Request) -> web.Response:
90
+ return web.json_response({"request": "ordinary"})
91
92
+ my_app.router.add_get("/", handler)
93
+ client = await aiohttp_client(my_app)
94
+ resp = await client.get("/")
95
+ assert resp.status == 200
96
+ assert await resp.json() == {"request": "ordinary"}
0 commit comments