diff options
author | Facundo Batista <facundobatista@gmail.com> | 2008-09-08 00:20:28 (GMT) |
---|---|---|
committer | Facundo Batista <facundobatista@gmail.com> | 2008-09-08 00:20:28 (GMT) |
commit | ace0bcf6690ccf042b20203325048f0b9fef85de (patch) | |
tree | d1121c4c69c244975020a5e8ecf015efed0e3a3d /Lib/test | |
parent | e080cdf30a2e0aa4ae557ed3434e2369d9199318 (diff) | |
download | cpython-ace0bcf6690ccf042b20203325048f0b9fef85de.zip cpython-ace0bcf6690ccf042b20203325048f0b9fef85de.tar.gz cpython-ace0bcf6690ccf042b20203325048f0b9fef85de.tar.bz2 |
Issue 3801. Fixing a dumb error in the deprecated parse_qsl()
function. Tests added.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_cgi.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py index 79bca4e..fa1d37f 100644 --- a/Lib/test/test_cgi.py +++ b/Lib/test/test_cgi.py @@ -344,6 +344,17 @@ this is the content of the fake file v = gen_result(data, environ) self.assertEqual(result, v) + def test_deprecated_parse_qs(self): + # this func is moved to urlparse, this is just a sanity check + self.assertEqual({'a': ['A1'], 'B': ['B3'], 'b': ['B2']}, + cgi.parse_qs('a=A1&b=B2&B=B3')) + + def test_deprecated_parse_qsl(self): + # this func is moved to urlparse, this is just a sanity check + self.assertEqual([('a', 'A1'), ('b', 'B2'), ('B', 'B3')], + cgi.parse_qsl('a=A1&b=B2&B=B3')) + + def test_main(): run_unittest(CgiTests) |