Merge pull request #469 from cjmayo/checklink

Remove defaults from lc_cgi.checklink()
This commit is contained in:
Chris Mayo 2020-08-14 19:57:03 +01:00 committed by GitHub
commit 33a5444dea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -18,7 +18,6 @@ Functions used by the WSGI script.
"""
import html
import os
import threading
import locale
import re
@ -137,7 +136,7 @@ def encode(s):
return s.encode(HTML_ENCODING, 'ignore')
def checklink(form=None, env=os.environ):
def checklink(form, env):
"""Validates the CGI form and checks the given links."""
if form is None:
form = {}

View file

@ -53,7 +53,7 @@ class TestWsgi(unittest.TestCase):
def test_checklink(self):
form = dict(url="http://www.example.com/", level="0")
checklink(form)
checklink(form, {})
def test_application(self):
form = dict(url="http://www.example.com/", level="0")