예제 #1
0
def test_base_provider_parser():
    baseparser = generate_base_provider_parser()
    parsed = baseparser.parse_args(['list', 'capsulecd.com', 'TXT'])
    assert parsed.action == 'list'
    assert parsed.domain == 'capsulecd.com'
    assert parsed.type == 'TXT'
    assert parsed.ttl == None
    assert parsed.output == 'TABLE'
예제 #2
0
def test_base_provider_parser():
    baseparser = parser.generate_base_provider_parser()
    parsed = baseparser.parse_args(["list", "capsulecd.com", "TXT"])
    assert parsed.action == "list"
    assert parsed.domain == "capsulecd.com"
    assert parsed.type == "TXT"
    assert parsed.ttl is None
    assert parsed.output == "TABLE"
예제 #3
0
def test_base_provider_parser_without_options():
    baseparser = generate_base_provider_parser()
    with pytest.raises(SystemExit):
        baseparser.parse_args([])
예제 #4
0
def test_base_provider_parser_without_domain():
    baseparser = generate_base_provider_parser()
    with pytest.raises(SystemExit):
        baseparser.parse_args(['list'])