diff options
author | Petr Viktorin <pviktori@redhat.com> | 2015-09-14 12:52:29 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-10-07 10:27:20 +0200 |
commit | 70b37a956c0b7dad52bf14fdb5fed421c01c8f77 (patch) | |
tree | 76768609fdbca12ccc93b092e14c4fc4ae06459a /ipatests/test_ipaserver/httptest.py | |
parent | 7f1204a42c0fd13602768e24da7af8814cbf97d2 (diff) | |
download | freeipa-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.py | 7 |
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, |