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

Function test_chunked

tests/test_client_functional.py:2731–2746  ·  view source on GitHub ↗
(aiohttp_client)

Source from the content-addressed store, hash-verified

2729
2730
2731async def test_chunked(aiohttp_client) -> None:
2732 async def handler(request):
2733 resp = web.Response(text="text")
2734 resp.enable_chunked_encoding()
2735 return resp
2736
2737 app = web.Application()
2738 app.router.add_get("/", handler)
2739 client = await aiohttp_client(app)
2740
2741 resp = await client.get("/")
2742 assert 200 == resp.status
2743 assert resp.headers["Transfer-Encoding"] == "chunked"
2744 txt = await resp.text()
2745 assert txt == "text"
2746 resp.close()
2747
2748
2749async def test_shortcuts(aiohttp_client) -> None:

Callers

nothing calls this directly

Calls 5

textMethod · 0.95
aiohttp_clientFunction · 0.85
add_getMethod · 0.80
getMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…