Skip to content

Commit

Permalink
pep8 fixes for previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Mar 15, 2019
1 parent 4f0b4ea commit 0c15cdc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion engineio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ def _connect_websocket(self, url, headers, engineio_path):
else:
raise exceptions.ConnectionError('Connection error')
if upgrade:
p = packet.Packet(packet.PING, data=six.text_type('probe')).encode()
p = packet.Packet(packet.PING,
data=six.text_type('probe')).encode()
try:
ws.send(p)
except Exception as e: # pragma: no cover
Expand Down
3 changes: 2 additions & 1 deletion tests/common/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,8 @@ def test_websocket_upgrade_successful(self, create_connection):
self.assertEqual(c.ws, create_connection.return_value)
self.assertEqual(
create_connection.return_value.send.call_args_list[0],
((packet.Packet(packet.PING, six.text_type('probe')).encode(),),)) # ping
((packet.Packet(packet.PING, six.text_type('probe')).encode(),),)
) # ping
self.assertEqual(
create_connection.return_value.send.call_args_list[1],
((packet.Packet(packet.UPGRADE).encode(),),)) # upgrade
Expand Down

0 comments on commit 0c15cdc

Please sign in to comment.