Changeset 6581
- Timestamp:
- 7 Aug 2011, 16:12:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/utils/tests/test_logger.py
r6578 r6581 182 182 return 183 183 184 def test_logger_additional_handlers(self): 185 # When we detect additional handlers in a logger, setup anew. 186 setSite(self.app) 187 logger = Logger() 188 old_py_logger = logger.logger 189 handler = logging.StreamHandler() 190 logger.logger.addHandler(handler) 191 old_handler_num = len(old_py_logger.handlers) 192 new_py_logger = logger.logger # This should detect new handler 193 new_handler_num = len(new_py_logger.handlers) 194 self.assertEqual(new_handler_num, 1) 195 self.assertTrue(isinstance( 196 new_py_logger.handlers[0], 197 logging.handlers.RotatingFileHandler)) 184 198 185 199 class LoggersFunctionalTests(FunctionalTestCase):
Note: See TracChangeset for help on using the changeset viewer.