Exemplo n.º 1
0
 def test_getLogHandlers(self):
     """util._getLogHandlers() should return ['rotating', 'console'] if
     both stderr and logfile logging are enabled.
     """
     logHandlers = util._getLogHandlers()
     self.assertIsInstance(logHandlers, list)
     self.assertEqual(len(logHandlers), 2)
Exemplo n.º 2
0
 def test_getLogHandlers(self):
     """util._getLogHandlers() should return ['rotating', 'console'] if
     both stderr and logfile logging are enabled.
     """
     logHandlers = util._getLogHandlers()
     self.assertIsInstance(logHandlers, list)
     self.assertEqual(len(logHandlers), 2)
Exemplo n.º 3
0
 def test_getLogHandlers_disableStderr(self):
     """util._getLogHandlers() should return ['rotating'] if stderr logging
     is disabled.
     """
     logHandlers = util._getLogHandlers(logToStderr=False)
     self.assertIsInstance(logHandlers, list)
     self.assertEqual(len(logHandlers), 1)
     self.assertTrue('console' not in logHandlers)
Exemplo n.º 4
0
 def test_getLogHandlers_disable_logfile(self):
     """util._getLogHandlers() should return ['console'] if stderr logging
     is disabled.
     """
     logHandlers = util._getLogHandlers(logToFile=False)
     self.assertIsInstance(logHandlers, list)
     self.assertEqual(len(logHandlers), 1)
     self.assertTrue('rotating' not in logHandlers)