def test_log_configurable_severity(level, expect, dummy_log_record): dummy_log_record.levelno = level filter = ExternalLoggerEnabled( enabled_flag=True, enabled_loggers=['awx', 'activity_stream', 'job_events', 'system_tracking'], lvl='WARNING' ) assert filter.filter(dummy_log_record) is expect
def test_base_logging_handler_skip_log(params, logger_name, expected, dummy_log_record): filter = ExternalLoggerEnabled(**params) dummy_log_record.name = logger_name assert filter.filter(dummy_log_record) is expected, (params, logger_name)