Skip to content

Commit

Permalink
fix failing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Aug 22, 2016
1 parent 39f8795 commit 78b884c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test_socketio.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,10 @@ def test_ack(self):
ack = client1.send('echo this message back', callback=True)
self.assertEqual(ack, 'echo this message back')
ack = client1.send('test noackargs', callback=True)
self.assertEqual(ack, [])
# python-socketio releases before 1.5 did not correctly implement
# callbacks with no arguments. Here we check for [] (the correct, 1.5
# and up response) and None (the wrong pre-1.5 response).
self.assertTrue(ack == [] or ack is None)
client2 = socketio.test_client(app)
ack2 = client2.send({'a': 'b'}, json=True, callback=True)
self.assertEqual(ack2, {'a': 'b'})
Expand Down

0 comments on commit 78b884c

Please sign in to comment.