MCPcopy
hub / github.com/encode/httpx / test_stream_response

Function test_stream_response

tests/client/test_async_client.py:71–78  ·  view source on GitHub ↗
(server)

Source from the content-addressed store, hash-verified

69
70@pytest.mark.anyio
71async def test_stream_response(server):
72 async with httpx.AsyncClient() as client:
73 async with client.stream("GET", server.url) as response:
74 body = await response.aread()
75
76 assert response.status_code == 200
77 assert body == b"Hello, world!"
78 assert response.content == b"Hello, world!"
79
80
81@pytest.mark.anyio

Callers

nothing calls this directly

Calls 2

streamMethod · 0.45
areadMethod · 0.45

Tested by

no test coverage detected