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'
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"
def test_base_provider_parser_without_options(): baseparser = generate_base_provider_parser() with pytest.raises(SystemExit): baseparser.parse_args([])
def test_base_provider_parser_without_domain(): baseparser = generate_base_provider_parser() with pytest.raises(SystemExit): baseparser.parse_args(['list'])