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