mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-24 09:50:23 +00:00
Remove unused url.url_fix_common_typos()
This commit is contained in:
parent
9488e1eb41
commit
d58b3ab285
2 changed files with 0 additions and 21 deletions
|
|
@ -224,15 +224,6 @@ def url_fix_host(urlparts, encoding):
|
|||
return is_idn
|
||||
|
||||
|
||||
def url_fix_common_typos(url):
|
||||
"""Fix common typos in given URL like forgotten colon."""
|
||||
if url.startswith("http//"):
|
||||
url = "http://" + url[6:]
|
||||
elif url.startswith("https//"):
|
||||
url = "https://" + url[7:]
|
||||
return url
|
||||
|
||||
|
||||
def url_fix_mailto_urlsplit(urlparts):
|
||||
"""Split query part of mailto url if found."""
|
||||
sep = "?"
|
||||
|
|
|
|||
|
|
@ -419,18 +419,6 @@ class TestUrl(unittest.TestCase):
|
|||
nurl = "%C3%A4%C3%B6%C3%BC?:"
|
||||
self.urlnormtest(url, nurl)
|
||||
|
||||
def test_fixing(self):
|
||||
# Test url fix method.
|
||||
url = "http//www.example.org"
|
||||
nurl = "http://www.example.org"
|
||||
self.assertEqual(linkcheck.url.url_fix_common_typos(url), nurl)
|
||||
url = "http//www.example.org"
|
||||
nurl = "http://www.example.org"
|
||||
self.assertEqual(linkcheck.url.url_fix_common_typos(url), nurl)
|
||||
url = "https//www.example.org"
|
||||
nurl = "https://www.example.org"
|
||||
self.assertEqual(linkcheck.url.url_fix_common_typos(url), nurl)
|
||||
|
||||
def test_valid(self):
|
||||
# Test url validity functions.
|
||||
u = "http://www.example.com"
|
||||
|
|
|
|||
Loading…
Reference in a new issue