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

Method test_connect

tests/common/test_client.py:168–191  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

166 c.register_namespace(n)
167
168 def test_connect(self):
169 c = client.Client()
170 c.eio.connect = mock.MagicMock()
171 c.connect(
172 'url',
173 headers='headers',
174 auth='auth',
175 transports='transports',
176 namespaces=['/foo', '/', '/bar'],
177 socketio_path='path',
178 wait=False,
179 )
180 assert c.connection_url == 'url'
181 assert c.connection_headers == 'headers'
182 assert c.connection_auth == 'auth'
183 assert c.connection_transports == 'transports'
184 assert c.connection_namespaces == ['/foo', '/', '/bar']
185 assert c.socketio_path == 'path'
186 c.eio.connect.assert_called_once_with(
187 'url',
188 headers='headers',
189 transports='transports',
190 engineio_path='path',
191 )
192
193 def test_connect_functions(self):
194 c = client.Client()

Callers

nothing calls this directly

Calls 1

connectMethod · 0.95

Tested by

no test coverage detected