web/test/unittest_views_basecontrollers.py
changeset 10603 65ad6980976e
parent 10587 72447be71b48
child 10704 73367a56ee41
--- a/web/test/unittest_views_basecontrollers.py	Mon Sep 14 12:19:48 2015 +0200
+++ b/web/test/unittest_views_basecontrollers.py	Tue Sep 22 09:39:30 2015 +0200
@@ -17,12 +17,7 @@
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
 """cubicweb.web.views.basecontrollers unit tests"""
 
-from urlparse import urlsplit, urlunsplit, urljoin
-# parse_qs is deprecated in cgi and has been moved to urlparse in Python 2.6
-try:
-    from urlparse import parse_qs as url_parse_query
-except ImportError:
-    from cgi import parse_qs as url_parse_query
+from six.moves.urllib.parse import urlsplit, urlunsplit, urljoin, parse_qs
 
 import lxml
 
@@ -1042,7 +1037,7 @@
         """
         with self.admin_access.web_request() as req:
             scheme, netloc, path, query, fragment = urlsplit(url)
-            query_dict = url_parse_query(query)
+            query_dict = parse_qs(query)
             expected_url = urljoin(req.base_url(), expected_path)
             self.assertEqual( urlunsplit((scheme, netloc, path, None, None)), expected_url)