def test_url_validation_with_none():
    schema = Schema({"url": Url()})
    try:
        schema({"url": None})
    except MultipleInvalid as e:
        assert_equal(str(e),
                     "expected a URL for dictionary value @ data['url']")
    else:
        assert False, "Did not raise Invalid for None url"
test with invalid None url
dataset/ETHPy150Open alecthomas/voluptuous/voluptuous/tests/tests.py/test_url_validation_with_none