(self)
| 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() |