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

Method test_offer_subprotocol

tests/test_client.py:585–590  ·  view source on GitHub ↗

Client offers a subprotocol.

(self)

Source from the content-addressed store, hash-verified

583 )
584
585 def test_offer_subprotocol(self):
586 """Client offers a subprotocol."""
587 client = ClientProtocol(URI, subprotocols=["chat"])
588 request = client.connect()
589
590 self.assertEqual(request.headers["Sec-WebSocket-Protocol"], "chat")
591
592 def test_enable_subprotocol(self):
593 """Client offers a subprotocol and the server enables it."""

Callers

nothing calls this directly

Calls 2

connectMethod · 0.95
ClientProtocolClass · 0.85

Tested by

no test coverage detected