From a08c983efc1cc7585f60ceb082a5b3d934efa55f Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Tue, 21 Aug 2012 11:46:35 -0400 Subject: [PATCH] Fix tests to use logging --- tests/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/__init__.py b/tests/__init__.py index 09c4e4b..398d23a 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,6 +1,7 @@ +import logging import unittest + from redis import Redis -from logbook import NullHandler from rq import push_connection, pop_connection @@ -47,9 +48,8 @@ class RQTestCase(unittest.TestCase): # Store the connection (for sanity checking) cls.testconn = testconn - # Shut up logbook - cls.log_handler = NullHandler() - cls.log_handler.push_thread() + # Shut up logging + logging.disable("ERROR") def setUp(self): # Flush beforewards (we like our hygiene) @@ -66,7 +66,7 @@ class RQTestCase(unittest.TestCase): @classmethod def tearDownClass(cls): - cls.log_handler.pop_thread() + logging.disable(logging.NOTSET) # Pop the connection to Redis testconn = pop_connection()