[server test] restore logging level after test end
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 13 May 2011 13:40:51 +0200
changeset 7381 a10b2d90d1a3
parent 7380 5ad8b2f951ba
child 7382 91061a22755d
[server test] restore logging level after test end
server/test/unittest_repository.py
--- a/server/test/unittest_repository.py	Fri May 13 13:40:48 2011 +0200
+++ b/server/test/unittest_repository.py	Fri May 13 13:40:51 2011 +0200
@@ -24,6 +24,7 @@
 import sys
 import threading
 import time
+import logging
 from copy import deepcopy
 from datetime import datetime
 
@@ -704,13 +705,17 @@
 
 
 class PerformanceTest(CubicWebTC):
-    def setup_database(self):
-        import logging
+    def setUp(self):
+        super(PerformanceTest, self).setUp()
         logger = logging.getLogger('cubicweb.session')
         #logger.handlers = [logging.StreamHandler(sys.stdout)]
         logger.setLevel(logging.INFO)
         self.info = logger.info
 
+    def tearDown(self):
+        super(PerformanceTest, self).tearDown()
+        logger.setLevel(logging.CRITICAL)
+
     def test_composite_deletion(self):
         req = self.request()
         personnes = []