diff --git a/tests/test_exception_handling.py b/tests/test_exception_handling.py index 0594353d..8e21f35b 100644 --- a/tests/test_exception_handling.py +++ b/tests/test_exception_handling.py @@ -46,8 +46,8 @@ class ExceptionTestCase(TestCase): output, _ = drain_zipline(self, zipline) self.assertEqual( - ctx.exception.message, - 'integer division or modulo by zero' + ctx.exception.message, + 'integer division or modulo by zero' ) @@ -149,6 +149,6 @@ class ExceptionTestCase(TestCase): output, _ = drain_zipline(self, zipline) self.assertEqual( - ctx.exception.message, - 'Too much time spent in handle_data call' - ) + ctx.exception.message, + 'Too much time spent in handle_data call' + ) diff --git a/zipline/utils/test_utils.py b/zipline/utils/test_utils.py index 7d80cefe..9ec7326c 100644 --- a/zipline/utils/test_utils.py +++ b/zipline/utils/test_utils.py @@ -70,7 +70,7 @@ def drain_zipline(test, zipline): for update in zipline: msg_counter += 1 output.append(update) - if update.has_key('daily_perf'): + if 'daily_perf' in update: transaction_count += \ len(update['daily_perf']['transactions'])