'Test with an invalid URL.'

@pytest.mark.parametrize('do_search,    exception', [(True, qtutils.QtValueError), (False, urlutils.InvalidUrlError)])
def test_invalid_url(self, do_search, exception, is_url_mock, monkeypatch, caplog):

    is_url_mock.return_value = True
    monkeypatch.setattr(urlutils, 'qurl_from_user_input', (lambda url: QUrl()))
    with pytest.raises(exception):
        with caplog.at_level(logging.ERROR):
            urlutils.fuzzy_url('foo', do_search=do_search)
