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

Function test_stream_iterator

tests/client/test_client.py:100–109  ·  view source on GitHub ↗
(server)

Source from the content-addressed store, hash-verified

98
99
100def test_stream_iterator(server):
101 body = b""
102
103 with httpx.Client() as client:
104 with client.stream("GET", server.url) as response:
105 for chunk in response.iter_bytes():
106 body += chunk
107
108 assert response.status_code == 200
109 assert body == b"Hello, world!"
110
111
112def test_raw_iterator(server):

Callers

nothing calls this directly

Calls 2

iter_bytesMethod · 0.80
streamMethod · 0.45

Tested by

no test coverage detected