示例#1
0
def test_invalid_url():
    url = 'http://www.example.com/file[/].html'
    assert not _is_valid_url(url)
示例#2
0
def test_is_valid_url_not_found():
    url = 'https://raw.githubusercontent.com/NCAR/esm-collection-spec/master/collection-spec/examples/sample-glade-cmip6-netcdf-collection.json'
    with mock.patch('requests.get') as mock_request:
        mock_request.return_value.status_code = 404
        assert not _is_valid_url(url)
示例#3
0
def test_is_valid_url_exception():
    url = 55555
    assert not _is_valid_url(url)
示例#4
0
def test_invalid_url(url):
    assert not _is_valid_url(url)