mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-08 00:20:59 +00:00
Fix configuration tests.
This commit is contained in:
parent
e358fc44d2
commit
d0396c585d
2 changed files with 7 additions and 15 deletions
|
|
@ -14,14 +14,10 @@ ignore=
|
|||
# IMADOOFUS
|
||||
ignore_imadoofus1
|
||||
ignore_imadoofus2
|
||||
ignore1=ignore_oldimadoofus1
|
||||
ignore2=ignore_oldimadoofus2
|
||||
nofollow=
|
||||
# IMADOOFUS
|
||||
nofollow_imadoofus1
|
||||
nofollow_imadoofus2
|
||||
nofollow1=nofollow_oldimadoofus1
|
||||
nofollow2=nofollow_oldimadoofus2
|
||||
ignorewarnings=url-unicode-domain,anchor-not-found
|
||||
|
||||
[authentication]
|
||||
|
|
@ -31,8 +27,6 @@ entry=
|
|||
imadoofus2 user2 pass2
|
||||
http://www.example.com/ user3 pass3
|
||||
http://www.example.com/nopass user4
|
||||
entry1=oldimadoofus1 user1 pass1
|
||||
entry2=oldimadoofus2 user2 pass2
|
||||
loginurl=http://www.example.com/
|
||||
loginuserfield=mylogin
|
||||
loginpasswordfield=mypassword
|
||||
|
|
|
|||
|
|
@ -50,19 +50,17 @@ class TestConfig (unittest.TestCase):
|
|||
self.assertTrue(config["storecookies"])
|
||||
# filtering section
|
||||
patterns = [x["pattern"].pattern for x in config["externlinks"]]
|
||||
for prefix1 in ("ignore_", "nofollow_"):
|
||||
for prefix2 in ("", "old"):
|
||||
for suffix in ("1", "2"):
|
||||
key = "%s%simadoofus%s" % (prefix1, prefix2, suffix)
|
||||
self.assertTrue(key in patterns)
|
||||
for prefix in ("ignore_", "nofollow_"):
|
||||
for suffix in ("1", "2"):
|
||||
key = "%simadoofus%s" % (prefix, suffix)
|
||||
self.assertTrue(key in patterns)
|
||||
for key in ("url-unicode-domain", "anchor-not-found"):
|
||||
self.assertTrue(key in config["ignorewarnings"])
|
||||
# authentication section
|
||||
patterns = [x["pattern"].pattern for x in config["authentication"]]
|
||||
for prefix in ("", "old"):
|
||||
for suffix in ("1", "2"):
|
||||
key = "%simadoofus%s" % (prefix, suffix)
|
||||
self.assertTrue(key in patterns)
|
||||
for suffix in ("1", "2"):
|
||||
key = "imadoofus%s" % suffix
|
||||
self.assertTrue(key in patterns)
|
||||
self.assertTrue("http://www.example.com/" in patterns)
|
||||
self.assertTrue("http://www.example.com/nopass" in patterns)
|
||||
self.assertEqual(config["loginurl"], "http://www.example.com/")
|
||||
|
|
|
|||
Loading…
Reference in a new issue