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

Function test_start

tests/test_web_response.py:463–479  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

461
462
463async def test_start() -> None:
464 req = make_request("GET", "/")
465 resp = StreamResponse()
466 assert resp.keep_alive is None
467
468 msg = await resp.prepare(req)
469
470 assert msg.write_headers.called
471 msg2 = await resp.prepare(req)
472 assert msg is msg2
473
474 assert resp.keep_alive
475
476 req2 = make_request("GET", "/")
477 # with pytest.raises(RuntimeError):
478 msg3 = await resp.prepare(req2)
479 assert msg is msg3
480
481
482async def test_chunked_encoding() -> None:

Callers

nothing calls this directly

Calls 3

prepareMethod · 0.95
StreamResponseClass · 0.90
make_requestFunction · 0.70

Tested by

no test coverage detected