Merged upstream change.

This commit is contained in:
Vinay Sajip 2012-03-13 12:18:19 +00:00
commit 69437da15f
1 changed files with 5 additions and 0 deletions

View File

@ -118,6 +118,11 @@ def gen_result(data, environ):
class CgiTests(unittest.TestCase):
def test_escape(self):
self.assertEqual("test & string", cgi.escape("test & string"))
self.assertEqual("&lt;test string&gt;", cgi.escape("<test string>"))
self.assertEqual("&quot;test string&quot;", cgi.escape('"test string"', True))
def test_strict(self):
for orig, expect in parse_strict_test_cases:
# Test basic parsing