Exemple #1
0
def test_sanitize_weird_characters():
    url = sanitize("https://httpbin.org/anything/drãke")
    assert url == "https://httpbin.org/anything/dr%C3%A3ke"
Exemple #2
0
def test_sanitize_missing_protocol():
    url = sanitize("gazpacho.xyz")
    if url != "http://gazpacho.xyz":
        raise AssertionError
Exemple #3
0
def test_sanitize_missing_protocol():
    url = sanitize("gazpacho.xyz")
    assert url == "http://gazpacho.xyz"
Exemple #4
0
def test_sanitize_weird_characters():
    url = sanitize("https://httpbin.org/anything/drãke")
    if url != "https://httpbin.org/anything/dr%C3%A3ke":
        raise AssertionError