Exemplo n.º 1
0
def test_url_fix():
    # Check url with unicode and spaces
    r = fetch_url('http://lavr.github.io/python-emails/tests/url-fix/Пушкин А.С.jpg')
    assert len(r.content) == 12910
Exemplo n.º 2
0
def test_fetch_url():
    fetch_url('http://google.com')
    with pytest.raises(HTTPLoaderError):
        fetch_url('http://google.com/nonexistent-no-page')