def test_parse(url_string, scheme, user, password, hostname, port): expected = { "SCHEME": scheme.lower(), "USER": user, "PASSWORD": password, "HOST": hostname.lower(), "PORT": port, } result = configurl.parse(url_string) assert result == expected
def test_success_with_empty_port_number(self, url_string): setting = configurl.parse(url_string) assert setting["PORT"] == ''
def test_raise_exception(self, url_string): with pytest.raises(configurl.Error): configurl.parse(url_string)