def test_recognize_url_https(): href = 'https://jenyay.net' basepath = '' recognizer = ur.URLRecognizer('') result = recognizer.recognize(href) assert result == href
def test_recognize_url_none(): href = None recognizer = ur.URLRecognizer('') result = recognizer.recognize(href) assert result is None
def test_recognize_url_invalid(): href = 'page://jenyay.net' recognizer = ur.URLRecognizer('') result = recognizer.recognize(href) assert result is None
def test_recognize_url_ftp(): href = 'ftp://jenyay.net' recognizer = ur.URLRecognizer('') result = recognizer.recognize(href) assert result == href
def test_recognize_url_mailto(): href = 'mailto:[email protected]' recognizer = ur.URLRecognizer('') result = recognizer.recognize(href) assert result == href