()
| 730 | |
| 731 | @pytest.mark.anyio |
| 732 | async def test_cannot_aread_after_stream_consumed(): |
| 733 | response = httpx.Response( |
| 734 | 200, |
| 735 | content=async_streaming_body(), |
| 736 | ) |
| 737 | |
| 738 | content = b"" |
| 739 | async for part in response.aiter_bytes(): |
| 740 | content += part |
| 741 | |
| 742 | with pytest.raises(httpx.StreamConsumed): |
| 743 | await response.aread() |
| 744 | |
| 745 | |
| 746 | def test_cannot_read_after_response_closed(): |
nothing calls this directly
no test coverage detected