MCPcopy
hub / github.com/aio-libs/aiohttp / test_ping_closed

Method test_ping_closed

tests/test_web_websocket.py:199–205  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

197 ws.send_bytes(b'bytes')
198
199 def test_ping_closed(self):
200 req = self.make_request('GET', '/')
201 ws = WebSocketResponse()
202 self.loop.run_until_complete(ws.prepare(req))
203 self.loop.run_until_complete(ws.close())
204 with self.assertRaises(RuntimeError):
205 ws.ping()
206
207 def test_pong_closed(self):
208 req = self.make_request('GET', '/')

Callers

nothing calls this directly

Calls 5

make_requestMethod · 0.95
prepareMethod · 0.95
closeMethod · 0.95
pingMethod · 0.95
WebSocketResponseClass · 0.90

Tested by

no test coverage detected