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

Function test_raw_iterator

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

Source from the content-addressed store, hash-verified

110
111
112def test_raw_iterator(server):
113 body = b""
114
115 with httpx.Client() as client:
116 with client.stream("GET", server.url) as response:
117 for chunk in response.iter_raw():
118 body += chunk
119
120 assert response.status_code == 200
121 assert body == b"Hello, world!"
122
123
124def test_cannot_stream_async_request(server):

Callers

nothing calls this directly

Calls 2

iter_rawMethod · 0.80
streamMethod · 0.45

Tested by

no test coverage detected