Ejemplo 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"
Ejemplo n.º 2
0
def test_sanitize_missing_protocol():
    url = sanitize("gazpacho.xyz")
    if url != "http://gazpacho.xyz":
        raise AssertionError
Ejemplo n.º 3
0
def test_sanitize_missing_protocol():
    url = sanitize("gazpacho.xyz")
    assert url == "http://gazpacho.xyz"
Ejemplo 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