Handshake fails when the Upgrade header is missing.
(self)
| 374 | ) |
| 375 | |
| 376 | def test_missing_upgrade(self): |
| 377 | """Handshake fails when the Upgrade header is missing.""" |
| 378 | client = ClientProtocol(URI) |
| 379 | with alter_and_receive_response(client) as response: |
| 380 | del response.headers["Upgrade"] |
| 381 | |
| 382 | self.assertHandshakeError( |
| 383 | client, |
| 384 | InvalidHeader, |
| 385 | "missing Upgrade header", |
| 386 | ) |
| 387 | |
| 388 | def test_invalid_upgrade(self): |
| 389 | """Handshake fails when the Upgrade header is invalid.""" |
nothing calls this directly
no test coverage detected