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

Function test_empty_read

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

Source from the content-addressed store, hash-verified

334
335
336def test_empty_read():
337 response = httpx.Response(200)
338
339 assert response.status_code == 200
340 assert response.text == ""
341 assert response.encoding == "utf-8"
342 assert response.is_closed
343
344 content = response.read()
345
346 assert content == b""
347 assert response.content == b""
348 assert response.is_closed
349
350
351@pytest.mark.anyio

Callers

nothing calls this directly

Calls 1

readMethod · 0.95

Tested by

no test coverage detected