(server)
| 110 | |
| 111 | |
| 112 | def 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 | |
| 124 | def test_cannot_stream_async_request(server): |