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

Function test_aread

tests/models/test_responses.py:352–367  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

350
351@pytest.mark.anyio
352async def test_aread():
353 response = httpx.Response(
354 200,
355 content=b"Hello, world!",
356 )
357
358 assert response.status_code == 200
359 assert response.text == "Hello, world!"
360 assert response.encoding == "utf-8"
361 assert response.is_closed
362
363 content = await response.aread()
364
365 assert content == b"Hello, world!"
366 assert response.content == b"Hello, world!"
367 assert response.is_closed
368
369
370@pytest.mark.anyio

Callers

nothing calls this directly

Calls 1

areadMethod · 0.95

Tested by

no test coverage detected