(server)
| 14 | |
| 15 | @pytest.mark.anyio |
| 16 | async def test_write_timeout(server): |
| 17 | timeout = httpx.Timeout(None, write=1e-6) |
| 18 | |
| 19 | async with httpx.AsyncClient(timeout=timeout) as client: |
| 20 | with pytest.raises(httpx.WriteTimeout): |
| 21 | data = b"*" * 1024 * 1024 * 100 |
| 22 | await client.put(server.url.copy_with(path="/slow_response"), content=data) |
| 23 | |
| 24 | |
| 25 | @pytest.mark.anyio |