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

Method test_connect_error

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

Source from the content-addressed store, hash-verified

281 )
282
283 def test_connect_error(self):
284 c = client.Client()
285 c.eio.connect = mock.MagicMock(
286 side_effect=engineio_exceptions.ConnectionError('foo')
287 )
288 c.on('foo', mock.MagicMock(), namespace='/foo')
289 c.on('bar', mock.MagicMock(), namespace='/')
290 with pytest.raises(exceptions.ConnectionError):
291 c.connect(
292 'url',
293 headers='headers',
294 transports='transports',
295 socketio_path='path',
296 wait=False,
297 )
298
299 def test_connect_twice(self):
300 c = client.Client()

Callers

nothing calls this directly

Calls 2

connectMethod · 0.95
onMethod · 0.45

Tested by

no test coverage detected