diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2012-03-13 08:50:27 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2012-03-13 08:50:27 (GMT) |
commit | 47b5ddb9cf0f3e278b54309756d08e79ef76b3a8 (patch) | |
tree | ae1bef20b1c818a9723729e4285b18f93655a381 | |
parent | 1732ab4f152f8da04ab937facef8d57004d67939 (diff) | |
download | cpython-47b5ddb9cf0f3e278b54309756d08e79ef76b3a8.zip cpython-47b5ddb9cf0f3e278b54309756d08e79ef76b3a8.tar.gz cpython-47b5ddb9cf0f3e278b54309756d08e79ef76b3a8.tar.bz2 |
3.2 - Fix closes Issue14281 - Test for cgi.escape by Brian Landers
-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 9951e93..3031fb3 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 |