Example #1
0
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)
Example #2
0
def test_json_output_formatter():
    opt = MockOpt()
    opt.json = True

    output_formatter = main.load_output_formatter(opt, null_logger())

    assert isinstance(output_formatter, JSONOutputFormatter)
Example #3
0
def test_csv_output_formatter():
    opt = MockOpt()
    opt.csv = True

    output_formatter = main.load_output_formatter(opt, null_logger())

    assert isinstance(output_formatter, CSVOutputFormatter)
Example #4
0
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)
Example #5
0
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)
Example #6
0
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)