From 3b0a5917586076a5a088c1add21dd20274dd9d07 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 3 Jul 2012 10:55:32 -0400 Subject: [PATCH] Backport logging setup for test_finance --- tests/test_finance.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_finance.py b/tests/test_finance.py index bbceac25..52807b6d 100644 --- a/tests/test_finance.py +++ b/tests/test_finance.py @@ -6,6 +6,7 @@ import pytz from unittest2 import TestCase from datetime import datetime, timedelta from collections import defaultdict +from logbook.compat import LoggingHandler from nose.tools import timed @@ -25,6 +26,7 @@ EXTENDED_TIMEOUT = 90 allocator = AddressAllocator(1000) + class FinanceTestCase(TestCase): leased_sockets = defaultdict(list) @@ -35,6 +37,11 @@ class FinanceTestCase(TestCase): 'allocator':allocator, 'sid':133 } + self.log_handler = LoggingHandler() + self.log_handler.push_application() + + def tearDown(self): + self.log_handler.pop_application() @timed(DEFAULT_TIMEOUT) def test_factory_daily(self):