MCPcopy Create free account
hub / github.com/apify/crawlee-python / test_stream

Function test_stream

tests/unit/http_clients/test_http_clients.py:169–177  ·  view source on GitHub ↗
(http_client: HttpClient, server_url: URL)

Source from the content-addressed store, hash-verified

167
168
169async def test_stream(http_client: HttpClient, server_url: URL) -> None:
170 content_body: bytes = b''
171
172 async with http_client.stream(str(server_url)) as response:
173 assert response.status_code == 200
174 async for chunk in response.read_stream():
175 content_body += chunk
176
177 assert content_body == HELLO_WORLD
178
179
180async def test_stream_error_double_read_stream(http_client: HttpClient, server_url: URL) -> None:

Callers

nothing calls this directly

Calls 2

streamMethod · 0.45
read_streamMethod · 0.45

Tested by

no test coverage detected