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

Method test_connection

tests/sync/test_server.py:36–40  ·  view source on GitHub ↗

Server receives connection from client and the handshake succeeds.

(self)

Source from the content-addressed store, hash-verified

34
35class ServerTests(EvalShellMixin, unittest.TestCase):
36 def test_connection(self):
37 """Server receives connection from client and the handshake succeeds."""
38 with run_server() as server:
39 with connect(get_uri(server)) as client:
40 self.assertEval(client, "ws.protocol.state.name", "OPEN")
41
42 def test_connection_handler_returns(self):
43 """Connection handler returns."""

Callers

nothing calls this directly

Calls 4

connectFunction · 0.90
run_serverFunction · 0.85
get_uriFunction · 0.70
assertEvalMethod · 0.45

Tested by

no test coverage detected