MCPcopy Index your code
hub / github.com/python-websockets/websockets / test_bypass_handshake

Method test_bypass_handshake

tests/test_client.py:646–651  ·  view source on GitHub ↗

ClientProtocol bypasses the opening handshake.

(self)

Source from the content-addressed store, hash-verified

644
645class MiscTests(unittest.TestCase):
646 def test_bypass_handshake(self):
647 """ClientProtocol bypasses the opening handshake."""
648 client = ClientProtocol(URI, state=OPEN)
649 client.receive_data(b"\x81\x06Hello!")
650 [frame] = client.events_received()
651 self.assertEqual(frame, Frame(OP_TEXT, b"Hello!"))
652
653 def test_custom_logger(self):
654 """ClientProtocol accepts a logger argument."""

Callers

nothing calls this directly

Calls 4

FrameClass · 0.90
ClientProtocolClass · 0.85
receive_dataMethod · 0.80
events_receivedMethod · 0.80

Tested by

no test coverage detected