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

Method test_connection

tests/asyncio/test_client.py:61–65  ·  view source on GitHub ↗

Client connects to server.

(self)

Source from the content-addressed store, hash-verified

59
60class ClientTests(unittest.IsolatedAsyncioTestCase):
61 async def test_connection(self):
62 """Client connects to server."""
63 async with serve(*args) as server:
64 async with connect(get_uri(server)) as client:
65 self.assertEqual(client.protocol.state.name, "OPEN")
66
67 async def test_explicit_host_port(self):
68 """Client connects using an explicit host / port."""

Callers

nothing calls this directly

Calls 3

serveFunction · 0.90
get_uriFunction · 0.70
connectFunction · 0.50

Tested by

no test coverage detected