(file_path)
| 96 | @pytest.mark.flaky(reruns=3, reruns_delay=2) |
| 97 | async def test_send_sync_bytes_stream(): |
| 98 | def file_to_bytes_stream(file_path): |
| 99 | with open(file_path, "rb") as f: |
| 100 | while chunk := f.read(1024): |
| 101 | yield chunk |
| 102 | |
| 103 | url = "https://httpbin.org/post" |
| 104 | response = await client.post(url, body=file_to_bytes_stream("README.md")) |
no outgoing calls
no test coverage detected