diff --git a/autopush/tests/test_websocket.py b/autopush/tests/test_websocket.py index c9a7d24c..e9efffe9 100644 --- a/autopush/tests/test_websocket.py +++ b/autopush/tests/test_websocket.py @@ -1261,11 +1261,9 @@ def raise_exception(*args, **kwargs): def wait_for_times(): # pragma: nocover if len(self.proto.log.failure.mock_calls) > 0: - try: - eq_(len(self.proto.log.failure.mock_calls), 1) - finally: - d.callback(True) - return + eq_(len(self.proto.log.failure.mock_calls), 1) + d.callback(True) + return reactor.callLater(0.1, wait_for_times) reactor.callLater(0.1, wait_for_times)