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

Method test_bypass_handshake

tests/test_server.py:939–944  ·  view source on GitHub ↗

ServerProtocol bypasses the opening handshake.

(self)

Source from the content-addressed store, hash-verified

937
938class MiscTests(unittest.TestCase):
939 def test_bypass_handshake(self):
940 """ServerProtocol bypasses the opening handshake."""
941 server = ServerProtocol(state=OPEN)
942 server.receive_data(b"\x81\x86\x00\x00\x00\x00Hello!")
943 [frame] = server.events_received()
944 self.assertEqual(frame, Frame(OP_TEXT, b"Hello!"))
945
946 def test_custom_logger(self):
947 """ServerProtocol accepts a logger argument."""

Callers

nothing calls this directly

Calls 4

FrameClass · 0.90
ServerProtocolClass · 0.85
receive_dataMethod · 0.80
events_receivedMethod · 0.80

Tested by

no test coverage detected