3 --- httpcore-1.0.6/tests/test_models.py.orig
4 +++ httpcore-1.0.6/tests/test_models.py
6 async def __aiter__(self) -> typing.AsyncIterator[bytes]:
7 for chunk in self._chunks:
12 -async def test_response_async_read():
13 - stream = AsyncByteIterator([b"Hello, ", b"world!"])
14 - response = httpcore.Response(200, content=stream)
15 - assert await response.aread() == b"Hello, world!"
16 - assert response.content == b"Hello, world!"
20 -async def test_response_async_streaming():
21 - stream = AsyncByteIterator([b"Hello, ", b"world!"])
22 - response = httpcore.Response(200, content=stream)
23 - content = b"".join([chunk async for chunk in response.aiter_stream()])
24 - assert content == b"Hello, world!"
26 - # We streamed the response rather than reading it, so .content is not available.
27 - with pytest.raises(RuntimeError):
30 - # Once we've streamed the response, we can't access the stream again.
31 - with pytest.raises(RuntimeError):
32 - async for chunk in response.aiter_stream():
33 - pass # pragma: nocover
34 --- httpcore-1.0.6/tests/_async/test_connection_pool.py.orig
35 +++ httpcore-1.0.6/tests/_async/test_connection_pool.py
38 import hyperframe.frame
40 -import trio as concurrency
41 +concurrency = pytest.importorskip("trio")