async def test_closed_app_send_noop(stream: WSStream) -> None: stream.closed = True await stream.app_send( cast(WebsocketAcceptEvent, {"type": "websocket.accept"})) stream.send.assert_not_called() # type: ignore
async def test_closed_app_send_noop(stream: WSStream) -> None: stream.closed = True await stream.app_send({"type": "websocket.accept"}) stream.send.assert_not_called()