diff options
author | Facundo Batista <facundobatista@gmail.com> | 2008-09-03 22:49:01 +0000 |
---|---|---|
committer | Facundo Batista <facundobatista@gmail.com> | 2008-09-03 22:49:01 +0000 |
commit | 95e91fcf99389113d771e4bd2b21a1791e0353da (patch) | |
tree | ad0eb094f96fe64e2a41c1f847f8e17b461b7c00 /Lib/test/test_cgi.py | |
parent | 2b6756d924a960566e444a3bd11af3a37e332ecd (diff) | |
download | cpython-95e91fcf99389113d771e4bd2b21a1791e0353da.tar.gz |
Issue 600362: Relocated parse_qs() and parse_qsl(), from the cgi module
to the urlparse one. Added a DeprecationWarning 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 | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py index cc11acc04f..ff2fc46653 100644 --- a/Lib/test/test_cgi.py +++ b/Lib/test/test_cgi.py @@ -53,25 +53,6 @@ def do_test(buf, method): except Exception as 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')]), - ("a=%26&b=%3D", [('a', '&'), ('b', '=')]), - ("a=%C3%BC&b=%CA%83", [('a', '\xfc'), ('b', '\u0283')]), -] - parse_strict_test_cases = [ ("", ValueError("bad query field: ''")), ("&", ValueError("bad query field: ''")), @@ -141,11 +122,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 |