MCPcopy Create free account
hub / github.com/aio-libs/aiohttp / handler

Function handler

tests/test_web_websocket_functional.py:20–25  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

18
19async def test_websocket_can_prepare(loop, aiohttp_client) -> None:
20 async def handler(request):
21 ws = web.WebSocketResponse()
22 if not ws.can_prepare(request):
23 raise web.HTTPUpgradeRequired()
24
25 return web.Response()
26
27 app = web.Application()
28 app.router.add_route("GET", "/", handler)

Callers

nothing calls this directly

Calls 15

can_prepareMethod · 0.95
prepareMethod · 0.95
closeMethod · 0.95
receiveMethod · 0.95
send_strMethod · 0.95
receive_jsonMethod · 0.95
send_jsonMethod · 0.95
receive_strMethod · 0.95
receive_bytesMethod · 0.95
send_bytesMethod · 0.95
exceptionMethod · 0.95
pingMethod · 0.95

Tested by

no test coverage detected