MCPcopy Create free account
hub / github.com/0x676e67/wreq-python / file_bytes_stream

Function file_bytes_stream

tests/request_test.py:81–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79@pytest.mark.flaky(reruns=3, reruns_delay=2)
80async 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())

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected