diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2012-03-13 08:51:20 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2012-03-13 08:51:20 (GMT) |
commit | 19b114b818a72c8bde5ddf10ced8aba8e10e7490 (patch) | |
tree | 17f5b0e69f862e22627edcaa80617dce09a0de6d /Lib | |
parent | 4bd53b13c63cd026dbc99372cbd5bb7cc29b8b9d (diff) | |
parent | 47b5ddb9cf0f3e278b54309756d08e79ef76b3a8 (diff) | |
download | cpython-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.py | 5 |
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 & string", cgi.escape("test & string")) + self.assertEqual("<test string>", cgi.escape("<test string>")) + self.assertEqual(""test string"", cgi.escape('"test string"', True)) + def test_strict(self): for orig, expect in parse_strict_test_cases: # Test basic parsing |