예제 #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