Handshake fails when the Sec-WebSocket-Accept header is missing.
(self)
| 399 | ) |
| 400 | |
| 401 | def test_missing_accept(self): |
| 402 | """Handshake fails when the Sec-WebSocket-Accept header is missing.""" |
| 403 | client = ClientProtocol(URI) |
| 404 | with alter_and_receive_response(client) as response: |
| 405 | del response.headers["Sec-WebSocket-Accept"] |
| 406 | |
| 407 | self.assertHandshakeError( |
| 408 | client, |
| 409 | InvalidHeader, |
| 410 | "missing Sec-WebSocket-Accept header", |
| 411 | ) |
| 412 | |
| 413 | def test_multiple_accept(self): |
| 414 | """Handshake fails when the Sec-WebSocket-Accept header is repeated.""" |
nothing calls this directly
no test coverage detected