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

Method test_origin

tests/test_client.py:153–158  ·  view source on GitHub ↗

connect(origin=...) generates an Origin header.

(self)

Source from the content-addressed store, hash-verified

151 self.assertEqual(request.headers["Authorization"], "Basic aGVsbG86aWxvdmV5b3U=")
152
153 def test_origin(self):
154 """connect(origin=...) generates an Origin header."""
155 client = ClientProtocol(URI, origin="https://example.com")
156 request = client.connect()
157
158 self.assertEqual(request.headers["Origin"], "https://example.com")
159
160 def test_extensions(self):
161 """connect(extensions=...) generates a Sec-WebSocket-Extensions header."""

Callers

nothing calls this directly

Calls 2

connectMethod · 0.95
ClientProtocolClass · 0.85

Tested by

no test coverage detected