Browse Source

force LEVEL warning for tests

Guénaël Muller 6 years ago
parent
commit
9f40425d9c
2 changed files with 4 additions and 1 deletions
  1. 1 1
      tests_configs.ini
  2. 3 0
      tracim/tests/__init__.py

+ 1 - 1
tests_configs.ini View File

@@ -62,4 +62,4 @@ email.processing_mode = async
62 62
 email.notification.smtp.server = 127.0.0.1
63 63
 email.notification.smtp.port = 1025
64 64
 email.notification.smtp.user = test_user
65
-email.notification.smtp.password = just_a_password
65
+email.notification.smtp.password = just_a_password

+ 3 - 0
tracim/tests/__init__.py View File

@@ -35,6 +35,7 @@ class FunctionalTest(unittest.TestCase):
35 35
     sqlalchemy_url = 'sqlite:///tracim_test.sqlite'
36 36
 
37 37
     def setUp(self):
38
+        logger._logger.setLevel('WARNING')
38 39
         DepotManager._clear()
39 40
         self.settings = {
40 41
             'sqlalchemy.url': self.sqlalchemy_url,
@@ -100,6 +101,7 @@ class CommandFunctionalTest(FunctionalTest):
100 101
     def run_app(self):
101 102
         self.session = get_tm_session(self.session_factory, transaction.manager)
102 103
 
104
+
103 105
 class BaseTest(unittest.TestCase):
104 106
     """
105 107
     Pyramid default test.
@@ -109,6 +111,7 @@ class BaseTest(unittest.TestCase):
109 111
     config_section = 'base_test'
110 112
 
111 113
     def setUp(self):
114
+        logger._logger.setLevel('WARNING')
112 115
         logger.debug(self, 'Setup Test...')
113 116
         self.settings = plaster.get_settings(
114 117
             self.config_uri,