mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-22 23:24:44 +00:00
Fix CGI tests for changed function args.
This commit is contained in:
parent
4e4a18315c
commit
0bd3402471
1 changed files with 8 additions and 4 deletions
|
|
@ -30,23 +30,27 @@ class TestWsgi (unittest.TestCase):
|
|||
|
||||
def test_form_valid_url (self):
|
||||
# Check url validity.
|
||||
env = dict()
|
||||
form = dict(url="http://www.example.com/", level="1")
|
||||
checkform(form)
|
||||
checkform(form, env)
|
||||
|
||||
def test_form_empty_url (self):
|
||||
# Check with empty url.
|
||||
env = dict()
|
||||
form = dict(url="", level="0")
|
||||
self.assertRaises(LCFormError, checkform, form)
|
||||
self.assertRaises(LCFormError, checkform, form, env)
|
||||
|
||||
def test_form_default_url (self):
|
||||
# Check with default url.
|
||||
env = dict()
|
||||
form = dict(url="http://", level="0")
|
||||
self.assertRaises(LCFormError, checkform, form)
|
||||
self.assertRaises(LCFormError, checkform, form, env)
|
||||
|
||||
def test_form_invalid_url (self):
|
||||
# Check url (in)validity.
|
||||
env = dict()
|
||||
form = dict(url="http://www.foo bar/", level="0")
|
||||
self.assertRaises(LCFormError, checkform, form)
|
||||
self.assertRaises(LCFormError, checkform, form, env)
|
||||
|
||||
def test_checklink (self):
|
||||
form = dict(url="http://www.example.com/", level="0")
|
||||
|
|
|
|||
Loading…
Reference in a new issue