diff options
author | Facundo Batista <facundobatista@gmail.com> | 2008-09-08 00:23:29 (GMT) |
---|---|---|
committer | Facundo Batista <facundobatista@gmail.com> | 2008-09-08 00:23:29 (GMT) |
commit | bd18fd6710a95a4585c9ce17e6ea7040d727d3bc (patch) | |
tree | 2c054915244e480ce10ea06c491cdda68a608b54 /Lib | |
parent | 3856c376a01711c7d7a4c278e6bc0a9b40bc5843 (diff) | |
download | cpython-bd18fd6710a95a4585c9ce17e6ea7040d727d3bc.zip cpython-bd18fd6710a95a4585c9ce17e6ea7040d727d3bc.tar.gz cpython-bd18fd6710a95a4585c9ce17e6ea7040d727d3bc.tar.bz2 |
Added sanity checks for the deprecated parse_qs() and
parse_qsl() functions in cgi module.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_cgi.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py index ff2fc46..9491001 100644 --- a/Lib/test/test_cgi.py +++ b/Lib/test/test_cgi.py @@ -306,6 +306,16 @@ 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) |