| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Python
Revision: 66301
Author: facundo.batista
Date: 07 Sep 2008 20:20:28
Changes:
Issue 3801. Fixing a dumb error in the deprecated parse_qsl()
function. Tests added.
| ... | ...@@ -344,6 +344,17 @@ | |
| 344 | 344 | v = gen_result(data, environ) |
| 345 | 345 | self.assertEqual(result, v) |
| 346 | 346 | |
| 347 | def test_deprecated_parse_qs(self): | |
| 348 | # this func is moved to urlparse, this is just a sanity check | |
| 349 | self.assertEqual({'a': ['A1'], 'B': ['B3'], 'b': ['B2']}, | |
| 350 | cgi.parse_qs('a=A1&b=B2&B=B3')) | |
| 351 | ||
| 352 | def test_deprecated_parse_qsl(self): | |
| 353 | # this func is moved to urlparse, this is just a sanity check | |
| 354 | self.assertEqual([('a', 'A1'), ('b', 'B2'), ('B', 'B3')], | |
| 355 | cgi.parse_qsl('a=A1&b=B2&B=B3')) | |
| 356 | ||
| 357 | ||
| 347 | 358 | def test_main(): |
| 348 | 359 | run_unittest(CgiTests) |
| 349 | 360 |
| ... | ...@@ -189,7 +189,7 @@ | |
| 189 | 189 | """Parse a query given as a string argument.""" |
| 190 | 190 | warn("cgi.parse_qsl is deprecated, use urlparse.parse_qsl instead", |
| 191 | 191 | PendingDeprecationWarning) |
| 192 | return urlparse.parse_qs(qs, keep_blank_values, strict_parsing) | |
| 192 | return urlparse.parse_qsl(qs, keep_blank_values, strict_parsing) | |
| 193 | 193 | |
| 194 | 194 | def parse_multipart(fp, pdict): |
| 195 | 195 | """Parse multipart input. |