MCPcopy Create free account
hub / github.com/miguelgrinberg/python-socketio / test_connect

Method test_connect

tests/async/test_client.py:20–43  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

18 assert c.is_asyncio_based()
19
20 async def test_connect(self):
21 c = async_client.AsyncClient()
22 c.eio.connect = mock.AsyncMock()
23 await c.connect(
24 'url',
25 headers='headers',
26 auth='auth',
27 transports='transports',
28 namespaces=['/foo', '/', '/bar'],
29 socketio_path='path',
30 wait=False,
31 )
32 assert c.connection_url == 'url'
33 assert c.connection_headers == 'headers'
34 assert c.connection_auth == 'auth'
35 assert c.connection_transports == 'transports'
36 assert c.connection_namespaces == ['/foo', '/', '/bar']
37 assert c.socketio_path == 'path'
38 c.eio.connect.assert_awaited_once_with(
39 'url',
40 headers='headers',
41 transports='transports',
42 engineio_path='path',
43 )
44
45 async def test_connect_functions(self):
46 async def headers():

Callers

nothing calls this directly

Calls 1

connectMethod · 0.95

Tested by

no test coverage detected