예제 #1
0
 def test_it_should_not_raise_error_if_log_dir_is_not_specified(self):
     try:
         log = LOG(None)
         log.debug('debug message')
         log.info('info message')
         log.error('error message')
         log.warn('warn message')
     except:
         self.fail("it should not get here")
예제 #2
0
 def test_it_should_use_logger_methods(self):
     log = LOG('log_dir_test/path/subpath')
     log.logger = Mock()
     log.debug('debug message')
     log.logger.debug.assert_called_with('debug message')
     log.info('info message')
     log.logger.info.assert_called_with('info message')
     log.error('error message')
     log.logger.error.assert_called_with('error message')
     log.warn('warn message')
     log.logger.warn.assert_called_with('warn message')