Пример #1
0
def test_cli_verbose():
    test_parser = create_parser()
    args = test_parser.parse_args(['-v'])
    assert args.loglevel == logging.INFO
Пример #2
0
def test_cli_interface():
    test_parser = create_parser()
    args = test_parser.parse_args(['-i eth0'])
    assert args.interface == ' eth0'
Пример #3
0
def test_cli_capturePath():
    test_parser = create_parser()
    args = test_parser.parse_args(['-c ../data/mycapturefile.pcap'])
    assert args.pcap == ' ../data/mycapturefile.pcap'
Пример #4
0
def test_cli_threadsHigh():
    test_parser = create_parser()
    args = test_parser.parse_args(['-t 1000000000000000'])
    assert args.threads == 1000000000000000
Пример #5
0
def test_cli_threadsLow():
    test_parser = create_parser()
    args = test_parser.parse_args(['-t 1'])
    assert args.threads == 1
Пример #6
0
def test_cli_threadsDefualt():
    test_parser = create_parser()
    args = test_parser.parse_args(['-v'])
    assert args.threads == 1