Esempio n. 1
0
def test_sanitize_weird_characters():
    url = sanitize("https://httpbin.org/anything/drãke")
    assert url == "https://httpbin.org/anything/dr%C3%A3ke"
Esempio n. 2
0
def test_sanitize_missing_protocol():
    url = sanitize("gazpacho.xyz")
    if url != "http://gazpacho.xyz":
        raise AssertionError
Esempio n. 3
0
def test_sanitize_missing_protocol():
    url = sanitize("gazpacho.xyz")
    assert url == "http://gazpacho.xyz"
Esempio n. 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