summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/oauth1/rfc5849/test_signatures.py5
-rw-r--r--tests/oauth2/rfc6749/clients/test_legacy_application.py6
-rw-r--r--tests/oauth2/rfc6749/clients/test_web_application.py6
-rw-r--r--tests/oauth2/rfc6749/endpoints/test_utils.py5
-rw-r--r--tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py6
5 files changed, 5 insertions, 23 deletions
diff --git a/tests/oauth1/rfc5849/test_signatures.py b/tests/oauth1/rfc5849/test_signatures.py
index 4eb7ff3..48a17c4 100644
--- a/tests/oauth1/rfc5849/test_signatures.py
+++ b/tests/oauth1/rfc5849/test_signatures.py
@@ -11,13 +11,10 @@ from oauthlib.oauth1.rfc5849.signature import (collect_parameters,
sign_plaintext_with_client,
sign_rsa_sha1,
sign_rsa_sha1_with_client)
+from urllib.parse import quote
from ...unittest import TestCase
-try:
- from urllib import quote
-except ImportError:
- from urllib.parse import quote
diff --git a/tests/oauth2/rfc6749/clients/test_legacy_application.py b/tests/oauth2/rfc6749/clients/test_legacy_application.py
index 01e46e4..20fb24b 100644
--- a/tests/oauth2/rfc6749/clients/test_legacy_application.py
+++ b/tests/oauth2/rfc6749/clients/test_legacy_application.py
@@ -7,14 +7,10 @@ from mock import patch
from oauthlib import signals
from oauthlib.oauth2 import LegacyApplicationClient
+import urllib.parse as urlparse
from ....unittest import TestCase
-# this is the same import method used in oauthlib/oauth2/rfc6749/parameters.py
-try:
- import urlparse
-except ImportError:
- import urllib.parse as urlparse
@patch('time.time', new=lambda: 1000)
diff --git a/tests/oauth2/rfc6749/clients/test_web_application.py b/tests/oauth2/rfc6749/clients/test_web_application.py
index f7fbb02..a4da237 100644
--- a/tests/oauth2/rfc6749/clients/test_web_application.py
+++ b/tests/oauth2/rfc6749/clients/test_web_application.py
@@ -13,14 +13,10 @@ from oauthlib.oauth2 import (BackendApplicationClient, Client,
WebApplicationClient)
from oauthlib.oauth2.rfc6749 import errors, utils
from oauthlib.oauth2.rfc6749.clients import AUTH_HEADER, BODY, URI_QUERY
+import urllib.parse as urlparse
from ....unittest import TestCase
-# this is the same import method used in oauthlib/oauth2/rfc6749/parameters.py
-try:
- import urlparse
-except ImportError:
- import urllib.parse as urlparse
@patch('time.time', new=lambda: 1000)
diff --git a/tests/oauth2/rfc6749/endpoints/test_utils.py b/tests/oauth2/rfc6749/endpoints/test_utils.py
index 6b7cff8..5eae195 100644
--- a/tests/oauth2/rfc6749/endpoints/test_utils.py
+++ b/tests/oauth2/rfc6749/endpoints/test_utils.py
@@ -1,7 +1,4 @@
-try:
- import urlparse
-except ImportError:
- import urllib.parse as urlparse
+import urllib.parse as urlparse
def get_query_credentials(uri):
diff --git a/tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py b/tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py
index 517239a..c8a707e 100644
--- a/tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py
+++ b/tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py
@@ -7,14 +7,10 @@ from oauthlib.oauth2.rfc6749.endpoints.authorization import \
AuthorizationEndpoint
from oauthlib.oauth2.rfc6749.tokens import BearerToken
from oauthlib.openid.connect.core.grant_types import AuthorizationCodeGrant
+from urllib.parse import urlencode
from tests.unittest import TestCase
-try:
- from urllib.parse import urlencode
-except ImportError:
- from urllib import urlencode
-
class OpenIDConnectEndpointTest(TestCase):