Skip to content

Commit

Permalink
fix websockets exception in unit tests #nolog
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Jul 29, 2019
1 parent 7548f70 commit e4709df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/asyncio/test_asyncio_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def test_polling_connection_not_upgraded(self):

@mock.patch('engineio.client.time.time', return_value=123.456)
@mock.patch('engineio.asyncio_client.websockets.connect', new=AsyncMock(
side_effect=[websockets.exceptions.InvalidURI]))
side_effect=[websockets.exceptions.InvalidURI('foo')]))
def test_websocket_connection_failed(self, _time):
c = asyncio_client.AsyncClient()
self.assertRaises(
Expand All @@ -436,7 +436,7 @@ def test_websocket_connection_failed(self, _time):

@mock.patch('engineio.client.time.time', return_value=123.456)
@mock.patch('engineio.asyncio_client.websockets.connect', new=AsyncMock(
side_effect=[websockets.exceptions.InvalidURI]))
side_effect=[websockets.exceptions.InvalidURI('foo')]))
def test_websocket_upgrade_failed(self, _time):
c = asyncio_client.AsyncClient()
c.sid = '123'
Expand Down

0 comments on commit e4709df

Please sign in to comment.