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

Method test_can_prepare_ok

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

Source from the content-addressed store, hash-verified

148 ws.write(b'data')
149
150 def test_can_prepare_ok(self):
151 req = self.make_request('GET', '/', protocols=True)
152 ws = WebSocketResponse(protocols=('chat',))
153 self.assertEqual((True, 'chat'), ws.can_prepare(req))
154
155 def test_can_prepare_unknown_protocol(self):
156 req = self.make_request('GET', '/')

Callers

nothing calls this directly

Calls 3

make_requestMethod · 0.95
can_prepareMethod · 0.95
WebSocketResponseClass · 0.90

Tested by

no test coverage detected