summaryrefslogtreecommitdiffstats
path: root/ipatests/test_ipaserver/httptest.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-09-14 12:52:29 +0200
committerJan Cholasta <jcholast@redhat.com>2015-10-07 10:27:20 +0200
commit70b37a956c0b7dad52bf14fdb5fed421c01c8f77 (patch)
tree76768609fdbca12ccc93b092e14c4fc4ae06459a /ipatests/test_ipaserver/httptest.py
parent7f1204a42c0fd13602768e24da7af8814cbf97d2 (diff)
downloadfreeipa-70b37a956c0b7dad52bf14fdb5fed421c01c8f77.tar.gz
freeipa-70b37a956c0b7dad52bf14fdb5fed421c01c8f77.tar.xz
freeipa-70b37a956c0b7dad52bf14fdb5fed421c01c8f77.zip
Use six.moves.urllib instead of urllib/urllib2/urlparse
In Python 3, these modules are reorganized. Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipatests/test_ipaserver/httptest.py')
-rw-r--r--ipatests/test_ipaserver/httptest.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ipatests/test_ipaserver/httptest.py b/ipatests/test_ipaserver/httptest.py
index 7f1b5b136..891364c06 100644
--- a/ipatests/test_ipaserver/httptest.py
+++ b/ipatests/test_ipaserver/httptest.py
@@ -20,9 +20,10 @@
Base class for HTTP request tests
"""
-import urllib
import httplib
+from six.moves import urllib
+
from ipalib import api
class Unauthorized_HTTP_test(object):
@@ -41,7 +42,9 @@ class Unauthorized_HTTP_test(object):
:param key When not None, overrides default app_uri
"""
if params is not None:
- params = urllib.urlencode(params, True)
+ # urlencode *can* take two arguments
+ # pylint: disable=too-many-function-args
+ params = urllib.parse.urlencode(params, True)
url = 'https://' + self.host + self.app_uri
headers = {'Content-Type' : self.content_type,