diff options
author | Facundo Batista <facundobatista@gmail.com> | 2008-09-03 22:35:50 (GMT) |
---|---|---|
committer | Facundo Batista <facundobatista@gmail.com> | 2008-09-03 22:35:50 (GMT) |
commit | c585df94766702ac6d6f3f0d27ad5d07e5546164 (patch) | |
tree | fafe4eb0d5bc1d5e6935ab4baf0f203d833d7ccd /Lib/test/test_cgi.py | |
parent | 69acb43327be1ee4dd19c4df3dc67668ebaa2d66 (diff) | |
download | cpython-c585df94766702ac6d6f3f0d27ad5d07e5546164.zip cpython-c585df94766702ac6d6f3f0d27ad5d07e5546164.tar.gz cpython-c585df94766702ac6d6f3f0d27ad5d07e5546164.tar.bz2 |
Issue 600362: Relocated parse_qs() and parse_qsl(), from the cgi module
to the urlparse one. Added a PendingDeprecationWarning in the old
module, it will be deprecated in the future. Docs and tests updated.
Diffstat (limited to 'Lib/test/test_cgi.py')
-rw-r--r-- | Lib/test/test_cgi.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py index 042e507..79bca4e 100644 --- a/Lib/test/test_cgi.py +++ b/Lib/test/test_cgi.py @@ -55,23 +55,6 @@ def do_test(buf, method): except StandardError, err: return ComparableException(err) -# A list of test cases. Each test case is a a two-tuple that contains -# a string with the query and a dictionary with the expected result. - -parse_qsl_test_cases = [ - ("", []), - ("&", []), - ("&&", []), - ("=", [('', '')]), - ("=a", [('', 'a')]), - ("a", [('a', '')]), - ("a=", [('a', '')]), - ("a=", [('a', '')]), - ("&a=b", [('a', 'b')]), - ("a=a+b&b=b+c", [('a', 'a b'), ('b', 'b c')]), - ("a=1&a=2", [('a', '1'), ('a', '2')]), -] - parse_strict_test_cases = [ ("", ValueError("bad query field: ''")), ("&", ValueError("bad query field: ''")), @@ -143,11 +126,6 @@ def gen_result(data, environ): class CgiTests(unittest.TestCase): - def test_qsl(self): - for orig, expect in parse_qsl_test_cases: - result = cgi.parse_qsl(orig, keep_blank_values=True) - self.assertEqual(result, expect, "Error parsing %s" % repr(orig)) - def test_strict(self): for orig, expect in parse_strict_test_cases: # Test basic parsing |