Exemple #1
0
def test_url_normalize(test_url, result):
    url_parser = Url(normalize=True)
    assert url_parser.parse(test_url) == result
Exemple #2
0
def test_url_default_value(default, test_data, result):
    url_parser = Url(default=default)
    assert url_parser.parse(test_data) == result
Exemple #3
0
def test_url_domain(domain, test_data, result):
    url_parser = Url(domain=domain)
    assert url_parser.parse(test_data) == result
Exemple #4
0
def test_url_remove_qs(remove_qs, test_data, result):
    url_parser = Url(remove_qs=remove_qs)
    assert url_parser.parse(test_data) == result
Exemple #5
0
def test_url_qs(qs, test_data, result):
    url_parser = Url(qs=qs)
    assert url_parser.parse(test_data) == result
Exemple #6
0
def test_url_from_text(test_data, result):
    url_parser = Url(from_text=True)
    assert url_parser.parse(test_data) == result
Exemple #7
0
def test_url_config(config_dict, result):
    url_parser = Url()

    url_parser.init_config(config_dict)
    assert url_parser.parse(test_url_partial) == result
Exemple #8
0
def test_url_from_qs(test_url, query_key, qs, result):
    url_parser = Url(from_qs=query_key, qs=qs)
    assert url_parser.parse(test_url) == result