From 47b5ddb9cf0f3e278b54309756d08e79ef76b3a8 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Tue, 13 Mar 2012 01:50:27 -0700 Subject: 3.2 - Fix closes Issue14281 - Test for cgi.escape by Brian Landers --- Lib/test/test_cgi.py | 5 +++++ 1 file changed, 5 insertions(+) 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("")) + self.assertEqual(""test string"", cgi.escape('"test string"', True)) + def test_strict(self): for orig, expect in parse_strict_test_cases: # Test basic parsing -- cgit v0.12