def test_set_detailed_junos_log_level_defined_at_db(self, mock_get_value): mock_get_value.return_value = 'WARNING' plugin = JUNOS(equipment_access=self.mock_equipment_access) loggers = [device_logger, ssh_logger, session_logger, rpc_logger] result = plugin.set_detailed_junos_log_level(loggers) self.assertEqual(result, 'WARNING')
def test_set_detailed_junos_log_level_not_defined_at_db(self): plugin = JUNOS(equipment_access=self.mock_equipment_access) loggers = [device_logger, ssh_logger, session_logger, rpc_logger] result = plugin.set_detailed_junos_log_level(loggers) self.assertEqual(result, 'ERROR')