From 068db4cb35ed281493459ee7d0610e3e23fdf435 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Sat, 26 Nov 2011 09:32:19 +0100 Subject: [PATCH] Shut up logbook during tests. --- tests/test_rq.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_rq.py b/tests/test_rq.py index 38abb701..c2f89d9d 100644 --- a/tests/test_rq.py +++ b/tests/test_rq.py @@ -1,6 +1,7 @@ import unittest from pickle import loads from redis import Redis +from logbook import NullHandler from rq import conn, Queue, Worker # Test data @@ -24,7 +25,13 @@ class RQTestCase(unittest.TestCase): # Store the connection (for sanity checking) self.testconn = testconn + # Shut up logbook + self.log_handler = NullHandler() + self.log_handler.push_thread() + def tearDown(self): + self.log_handler.pop_thread() + # Flush afterwards conn.flushdb()