mirror of https://github.com/rq/rq.git
Fix tests to use logging
This commit is contained in:
parent
82c4ac6ec2
commit
a08c983efc
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue