diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2012-03-13 01:48:41 -0700 |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2012-03-13 01:48:41 -0700 |
commit | d17a898fcfb9943d4f7ad0ed719cc829f4a1ab12 (patch) | |
tree | 257ace055009258f3f30ebca90e9f887a48fd88a /Lib/test/test_cgi.py | |
parent | b968b36ad0b46bf7a909afffb3b558ed5aeebfe0 (diff) | |
download | cpython-git-d17a898fcfb9943d4f7ad0ed719cc829f4a1ab12.tar.gz |
Fix closes Issue14281 - Test for cgi.escape by Brian Landers
Diffstat (limited to 'Lib/test/test_cgi.py')
-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 63547b24c2..f6abe976cf 100644 --- a/Lib/test/test_cgi.py +++ b/Lib/test/test_cgi.py @@ -120,6 +120,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 |