MCPcopy
hub / github.com/django/django / test_disconnect

Method test_disconnect

tests/asgi/tests.py:389–395  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

387 await communicator.wait()
388
389 async def test_disconnect(self):
390 application = get_asgi_application()
391 scope = self.async_request_factory._base_scope(path="/")
392 communicator = ApplicationCommunicator(application, scope)
393 await communicator.send_input({"type": "http.disconnect"})
394 with self.assertRaises(asyncio.TimeoutError):
395 await communicator.receive_output()
396
397 async def test_disconnect_both_return(self):
398 # Force both the disconnect listener and the task that sends the

Callers

nothing calls this directly

Calls 2

get_asgi_applicationFunction · 0.90
_base_scopeMethod · 0.80

Tested by

no test coverage detected