Esempio n. 1
0
    def test_init_logger(self):
        # Test that a logger was properly initialized
        bandit._init_logger()

        self.assertIsNotNone(self.logger)
        self.assertNotEqual(self.logger.handlers, [])
        self.assertEqual(logging.INFO, self.logger.level)
Esempio n. 2
0
    def test_init_logger(self):
        # Test that a logger was properly initialized
        bandit._init_logger(False)

        self.assertIsNotNone(self.logger)
        self.assertNotEqual(self.logger.handlers, [])
        self.assertEqual(logging.INFO, self.logger.level)
Esempio n. 3
0
 def test_init_logger_debug_mode(self):
     # Test that the logger's level was set at 'DEBUG'
     bandit._init_logger(logging.DEBUG)
     self.assertEqual(logging.DEBUG, self.logger.level)
Esempio n. 4
0
 def test_init_logger_debug_mode(self):
     # Test that the logger's level was set at 'DEBUG'
     bandit._init_logger(True)
     self.assertEqual(logging.DEBUG, self.logger.level)