MCPcopy Index your code
hub / github.com/python-websockets/websockets / test_multiple_accept

Method test_multiple_accept

tests/test_client.py:413–423  ·  view source on GitHub ↗

Handshake fails when the Sec-WebSocket-Accept header is repeated.

(self)

Source from the content-addressed store, hash-verified

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."""

Callers

nothing calls this directly

Calls 3

assertHandshakeErrorMethod · 0.95
ClientProtocolClass · 0.85

Tested by

no test coverage detected