Beispiel #1
0
 def test_setup_logging_no_log_level(self):
     mock_log_handler = Mock()
     worker_inst = Worker(
         logfile="TEMP",
         logformat="LOGFORMAT",
         loghandlers=[mock_log_handler],
     )
     worker_inst._setup_logging()
     self.setup_logging.assert_not_called()
Beispiel #2
0
 def test_setup_logging(self, loghandlers):
     worker_inst = Worker(
         loglevel=5,
         logfile='TEMP',
         logging_config=None,
         loghandlers=loghandlers,
     )
     worker_inst._setup_logging()
     self.setup_logging.assert_called_once_with(
         loglevel=5,
         logfile='TEMP',
         logging_config=None,
         loghandlers=loghandlers or [],
     )
Beispiel #3
0
 def test_setup_logging(self, loghandlers):
     worker_inst = Worker(
         loglevel=5,
         logfile="TEMP",
         logformat="LOGFORMAT",
         loghandlers=loghandlers,
     )
     worker_inst._setup_logging()
     self.setup_logging.assert_called_once_with(
         loglevel=5,
         logfile="TEMP",
         logformat="LOGFORMAT",
         loghandlers=loghandlers,
     )