MCPcopy
hub / github.com/aio-libs/aiohttp / test_connections

Function test_connections

tests/test_web_request_handler.py:20–31  ·  view source on GitHub ↗
(loop)

Source from the content-addressed store, hash-verified

18
19
20def test_connections(loop):
21 app = web.Application(loop=loop)
22 manager = app.make_handler()
23 assert manager.connections == []
24
25 handler = object()
26 transport = object()
27 manager.connection_made(handler, transport)
28 assert manager.connections == [handler]
29
30 manager.connection_lost(handler, None)
31 assert manager.connections == []
32
33
34@pytest.mark.run_loop

Callers

nothing calls this directly

Calls 3

make_handlerMethod · 0.95
connection_madeMethod · 0.45
connection_lostMethod · 0.45

Tested by

no test coverage detected