def test_syslog_light_output_formatter(): opt = MockOpt() opt.syslog_light = True output_formatter = main.load_output_formatter(opt, null_logger()) assert isinstance(output_formatter, SyslogOutputFormatter)
def test_json_output_formatter(): opt = MockOpt() opt.json = True output_formatter = main.load_output_formatter(opt, null_logger()) assert isinstance(output_formatter, JSONOutputFormatter)
def test_csv_output_formatter(): opt = MockOpt() opt.csv = True output_formatter = main.load_output_formatter(opt, null_logger()) assert isinstance(output_formatter, CSVOutputFormatter)
def test_nagios_output_formatter(): opt = MockOpt() opt.nagios_mode = True output_formatter = main.load_output_formatter(opt, null_logger()) assert isinstance(output_formatter, NagiosOutputFormatter)
def test_cve_output_formatter(): opt = MockOpt() opt.cve = True output_formatter = main.load_output_formatter(opt) assert isinstance(output_formatter, cve_output_formatter.CVEOutputFormatter)
def test_cli_output_formatter(): opt = MockOpt() opt.cve = False opt.nagios_mode = False output_formatter = main.load_output_formatter(opt, null_logger()) assert isinstance(output_formatter, CLIOutputFormatter)