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

Method test_send_str_closed

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

Source from the content-addressed store, hash-verified

181 self.assertIsNone(ws.close_code)
182
183 def test_send_str_closed(self):
184 req = self.make_request('GET', '/')
185 ws = WebSocketResponse()
186 self.loop.run_until_complete(ws.prepare(req))
187 self.loop.run_until_complete(ws.close())
188 with self.assertRaises(RuntimeError):
189 ws.send_str('string')
190
191 def test_send_bytes_closed(self):
192 req = self.make_request('GET', '/')

Callers

nothing calls this directly

Calls 5

make_requestMethod · 0.95
prepareMethod · 0.95
closeMethod · 0.95
send_strMethod · 0.95
WebSocketResponseClass · 0.90

Tested by

no test coverage detected