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

Method test_server_receives_close

tests/test_protocol.py:847–852  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

845 self.assertIs(client.state, CLOSING)
846
847 def test_server_receives_close(self):
848 server = Protocol(SERVER)
849 server.receive_data(b"\x88\x80\x3c\x3c\x3c\x3c")
850 self.assertEqual(server.events_received(), [Frame(OP_CLOSE, b"")])
851 self.assertEqual(server.data_to_send(), [b"\x88\x00", b""])
852 self.assertIs(server.state, CLOSING)
853
854 def test_client_sends_close_then_receives_close(self):
855 # Client-initiated close handshake on the client side.

Callers

nothing calls this directly

Calls 5

receive_dataMethod · 0.95
events_receivedMethod · 0.95
data_to_sendMethod · 0.95
FrameClass · 0.90
ProtocolClass · 0.50

Tested by

no test coverage detected