[Python-3000-checkins] r66302 - python/branches/py3k/Lib/test/test_cgi.py

facundo.batista python-3000-checkins at python.org
Mon Sep 8 02:23:29 CEST 2008


Author: facundo.batista
Date: Mon Sep  8 02:23:29 2008
New Revision: 66302

Log:

Added sanity checks for the deprecated parse_qs() and 
parse_qsl() functions in cgi module.


Modified:
   python/branches/py3k/Lib/test/test_cgi.py

Modified: python/branches/py3k/Lib/test/test_cgi.py
==============================================================================
--- python/branches/py3k/Lib/test/test_cgi.py	(original)
+++ python/branches/py3k/Lib/test/test_cgi.py	Mon Sep  8 02:23:29 2008
@@ -306,6 +306,16 @@
         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)
 


More information about the Python-3000-checkins mailing list