mirror of https://github.com/encode/starlette.git
Close unclosed `MemoryObjectReceiveStream` in `TestClient` (#2693)
This commit is contained in:
parent
2d0dde8def
commit
6d70ad3ba8
|
@ -784,7 +784,7 @@ class TestClient(httpx.Client):
|
|||
self.task.result()
|
||||
return message
|
||||
|
||||
async with self.stream_send:
|
||||
async with self.stream_send, self.stream_receive:
|
||||
await self.stream_receive.send({"type": "lifespan.shutdown"})
|
||||
message = await receive()
|
||||
assert message["type"] in (
|
||||
|
|
Loading…
Reference in New Issue