Handshake fails when the Sec-WebSocket-Accept header is repeated.
(self)
| 411 | ) |
| 412 | |
| 413 | def test_multiple_accept(self): |
| 414 | """Handshake fails when the Sec-WebSocket-Accept header is repeated.""" |
| 415 | client = ClientProtocol(URI) |
| 416 | with alter_and_receive_response(client) as response: |
| 417 | response.headers["Sec-WebSocket-Accept"] = ACCEPT |
| 418 | |
| 419 | self.assertHandshakeError( |
| 420 | client, |
| 421 | InvalidHeader, |
| 422 | "invalid Sec-WebSocket-Accept header: multiple values", |
| 423 | ) |
| 424 | |
| 425 | def test_invalid_accept(self): |
| 426 | """Handshake fails when the Sec-WebSocket-Accept header is invalid.""" |
nothing calls this directly
no test coverage detected