MCPcopy Create free account
hub / github.com/python-websockets/websockets / test_server_sends_close

Method test_server_sends_close

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

Source from the content-addressed store, hash-verified

831 self.assertIs(client.state, CLOSING)
832
833 def test_server_sends_close(self):
834 server = Protocol(SERVER)
835 server.send_close()
836 self.assertEqual(server.data_to_send(), [b"\x88\x00"])
837 self.assertIs(server.state, CLOSING)
838
839 def test_client_receives_close(self):
840 client = Protocol(CLIENT)

Callers

nothing calls this directly

Calls 3

send_closeMethod · 0.95
data_to_sendMethod · 0.95
ProtocolClass · 0.50

Tested by

no test coverage detected