()
| 396 | |
| 397 | |
| 398 | def test_iter_raw_with_chunksize(): |
| 399 | response = httpx.Response(200, content=streaming_body()) |
| 400 | parts = list(response.iter_raw(chunk_size=5)) |
| 401 | assert parts == [b"Hello", b", wor", b"ld!"] |
| 402 | |
| 403 | response = httpx.Response(200, content=streaming_body()) |
| 404 | parts = list(response.iter_raw(chunk_size=7)) |
| 405 | assert parts == [b"Hello, ", b"world!"] |
| 406 | |
| 407 | response = httpx.Response(200, content=streaming_body()) |
| 408 | parts = list(response.iter_raw(chunk_size=13)) |
| 409 | assert parts == [b"Hello, world!"] |
| 410 | |
| 411 | response = httpx.Response(200, content=streaming_body()) |
| 412 | parts = list(response.iter_raw(chunk_size=20)) |
| 413 | assert parts == [b"Hello, world!"] |
| 414 | |
| 415 | |
| 416 | def test_iter_raw_doesnt_return_empty_chunks(): |
nothing calls this directly
no test coverage detected