Client receives no handshake response.
(self, _generate_key)
| 244 | ) |
| 245 | |
| 246 | def test_receive_no_response(self, _generate_key): |
| 247 | """Client receives no handshake response.""" |
| 248 | client = ClientProtocol(URI) |
| 249 | client.receive_eof() |
| 250 | |
| 251 | self.assertEqual(client.events_received(), []) |
| 252 | self.assertIsInstance(client.handshake_exc, InvalidMessage) |
| 253 | self.assertEqual( |
| 254 | str(client.handshake_exc), |
| 255 | "did not receive a valid HTTP response", |
| 256 | ) |
| 257 | self.assertIsInstance(client.handshake_exc.__cause__, EOFError) |
| 258 | self.assertEqual( |
| 259 | str(client.handshake_exc.__cause__), |
| 260 | "connection closed while reading HTTP status line", |
| 261 | ) |
| 262 | |
| 263 | def test_receive_truncated_response(self, _generate_key): |
| 264 | """Client receives a truncated handshake response.""" |
nothing calls this directly
no test coverage detected