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

Method test_can_prepare_started

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

Source from the content-addressed store, hash-verified

169 self.assertEqual((False, None), ws.can_prepare(req))
170
171 def test_can_prepare_started(self):
172 req = self.make_request('GET', '/')
173 ws = WebSocketResponse()
174 self.loop.run_until_complete(ws.prepare(req))
175 with self.assertRaisesRegex(RuntimeError, 'Already started'):
176 ws.can_prepare(req)
177
178 def test_closed_after_ctor(self):
179 ws = WebSocketResponse()

Callers

nothing calls this directly

Calls 4

make_requestMethod · 0.95
prepareMethod · 0.95
can_prepareMethod · 0.95
WebSocketResponseClass · 0.90

Tested by

no test coverage detected