()
| 78 | @pytest.mark.asyncio |
| 79 | @pytest.mark.flaky(reruns=3, reruns_delay=2) |
| 80 | async def test_send_async_bytes_stream(): |
| 81 | async def file_bytes_stream(): |
| 82 | with open("README.md", "rb") as f: |
| 83 | while True: |
| 84 | chunk = f.read(1024) |
| 85 | if not chunk: |
| 86 | break |
| 87 | yield chunk |
| 88 | |
| 89 | url = "https://httpbin.org/post" |
| 90 | response = await client.post(url, body=file_bytes_stream()) |
| 91 | json = await response.json() |
| 92 | assert json["data"] in open("README.md").read() |
| 93 | |
| 94 | |
| 95 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected