summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2012-03-13 08:51:20 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2012-03-13 08:51:20 (GMT)
commit19b114b818a72c8bde5ddf10ced8aba8e10e7490 (patch)
tree17f5b0e69f862e22627edcaa80617dce09a0de6d /Lib
parent4bd53b13c63cd026dbc99372cbd5bb7cc29b8b9d (diff)
parent47b5ddb9cf0f3e278b54309756d08e79ef76b3a8 (diff)
downloadcpython-19b114b818a72c8bde5ddf10ced8aba8e10e7490.zip
cpython-19b114b818a72c8bde5ddf10ced8aba8e10e7490.tar.gz
cpython-19b114b818a72c8bde5ddf10ced8aba8e10e7490.tar.bz2
merge to 3.3 - Fix closes Issue14281 - Test for cgi.escape by Brian Landers
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_cgi.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py
index cb59008..d2510a4 100644
--- a/Lib/test/test_cgi.py
+++ b/Lib/test/test_cgi.py
@@ -118,6 +118,11 @@ def gen_result(data, environ):
class CgiTests(unittest.TestCase):
+ def test_escape(self):
+ self.assertEqual("test &amp; 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