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

Function test_read

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

Source from the content-addressed store, hash-verified

316
317
318def test_read():
319 response = httpx.Response(
320 200,
321 content=b"Hello, world!",
322 )
323
324 assert response.status_code == 200
325 assert response.text == "Hello, world!"
326 assert response.encoding == "utf-8"
327 assert response.is_closed
328
329 content = response.read()
330
331 assert content == b"Hello, world!"
332 assert response.content == b"Hello, world!"
333 assert response.is_closed
334
335
336def test_empty_read():

Callers

nothing calls this directly

Calls 1

readMethod · 0.95

Tested by

no test coverage detected