(self)
| 837 | self.assertIs(server.state, CLOSING) |
| 838 | |
| 839 | def test_client_receives_close(self): |
| 840 | client = Protocol(CLIENT) |
| 841 | with patch("secrets.token_bytes", return_value=b"\x3c\x3c\x3c\x3c"): |
| 842 | client.receive_data(b"\x88\x00") |
| 843 | self.assertEqual(client.events_received(), [Frame(OP_CLOSE, b"")]) |
| 844 | self.assertEqual(client.data_to_send(), [b"\x88\x80\x3c\x3c\x3c\x3c"]) |
| 845 | self.assertIs(client.state, CLOSING) |
| 846 | |
| 847 | def test_server_receives_close(self): |
| 848 | server = Protocol(SERVER) |
nothing calls this directly
no test coverage detected