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

Method test_missing_connection

tests/test_client.py:351–361  ·  view source on GitHub ↗

Handshake fails when the Connection header is missing.

(self)

Source from the content-addressed store, hash-verified

349 self.assertHandshakeSuccess(client)
350
351 def test_missing_connection(self):
352 """Handshake fails when the Connection header is missing."""
353 client = ClientProtocol(URI)
354 with alter_and_receive_response(client) as response:
355 del response.headers["Connection"]
356
357 self.assertHandshakeError(
358 client,
359 InvalidHeader,
360 "missing Connection header",
361 )
362
363 def test_invalid_connection(self):
364 """Handshake fails when the Connection header is invalid."""

Callers

nothing calls this directly

Calls 3

assertHandshakeErrorMethod · 0.95
ClientProtocolClass · 0.85

Tested by

no test coverage detected