Ejemplo n.º 1
0
def test_url_no_scheme():
    """URL format is wrong, missing scheme."""
    with pytest.raises(ValueError) as cm:
        check_url("some.server.com")
    assert str(
        cm.value) == "must be a full URL (e.g. 'https://some.server.com')"
Ejemplo n.º 2
0
def test_url_no_netloc():
    """URL format is wrong, missing network location."""
    with pytest.raises(ValueError) as cm:
        check_url("https://")
    assert str(
        cm.value) == "must be a full URL (e.g. 'https://some.server.com')"
Ejemplo n.º 3
0
def test_url_ok():
    """URL format is ok."""
    assert check_url("https://some.server.com")