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')"
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')"
def test_url_ok(): """URL format is ok.""" assert check_url("https://some.server.com")