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

Method test_send_bytes_closed

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

Source from the content-addressed store, hash-verified

189 ws.send_str('string')
190
191 def test_send_bytes_closed(self):
192 req = self.make_request('GET', '/')
193 ws = WebSocketResponse()
194 self.loop.run_until_complete(ws.prepare(req))
195 self.loop.run_until_complete(ws.close())
196 with self.assertRaises(RuntimeError):
197 ws.send_bytes(b'bytes')
198
199 def test_ping_closed(self):
200 req = self.make_request('GET', '/')

Callers

nothing calls this directly

Calls 5

make_requestMethod · 0.95
prepareMethod · 0.95
closeMethod · 0.95
send_bytesMethod · 0.95
WebSocketResponseClass · 0.90

Tested by

no test coverage detected