(self)
| 824 | self.assertIsNone(client.close_reason) |
| 825 | |
| 826 | def test_client_sends_close(self): |
| 827 | client = Protocol(CLIENT) |
| 828 | with patch("secrets.token_bytes", return_value=b"\x3c\x3c\x3c\x3c"): |
| 829 | client.send_close() |
| 830 | self.assertEqual(client.data_to_send(), [b"\x88\x80\x3c\x3c\x3c\x3c"]) |
| 831 | self.assertIs(client.state, CLOSING) |
| 832 | |
| 833 | def test_server_sends_close(self): |
| 834 | server = Protocol(SERVER) |
nothing calls this directly
no test coverage detected