summaryrefslogtreecommitdiff
path: root/tests/oauth2/rfc6749/endpoints
diff options
context:
space:
mode:
Diffstat (limited to 'tests/oauth2/rfc6749/endpoints')
-rw-r--r--tests/oauth2/rfc6749/endpoints/test_base_endpoint.py2
-rw-r--r--tests/oauth2/rfc6749/endpoints/test_client_authentication.py2
-rw-r--r--tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py2
-rw-r--r--tests/oauth2/rfc6749/endpoints/test_error_responses.py2
-rw-r--r--tests/oauth2/rfc6749/endpoints/test_extra_credentials.py2
-rw-r--r--tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py2
-rw-r--r--tests/oauth2/rfc6749/endpoints/test_metadata.py2
-rw-r--r--tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py2
-rw-r--r--tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py2
-rw-r--r--tests/oauth2/rfc6749/endpoints/test_scope_handling.py8
-rw-r--r--tests/oauth2/rfc6749/endpoints/test_utils.py5
11 files changed, 4 insertions, 27 deletions
diff --git a/tests/oauth2/rfc6749/endpoints/test_base_endpoint.py b/tests/oauth2/rfc6749/endpoints/test_base_endpoint.py
index bf04a42..2289b58 100644
--- a/tests/oauth2/rfc6749/endpoints/test_base_endpoint.py
+++ b/tests/oauth2/rfc6749/endpoints/test_base_endpoint.py
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
-from __future__ import absolute_import, unicode_literals
-
from oauthlib.oauth2 import (FatalClientError, OAuth2Error, RequestValidator,
Server)
from oauthlib.oauth2.rfc6749 import (BaseEndpoint,
diff --git a/tests/oauth2/rfc6749/endpoints/test_client_authentication.py b/tests/oauth2/rfc6749/endpoints/test_client_authentication.py
index 133da59..48b5485 100644
--- a/tests/oauth2/rfc6749/endpoints/test_client_authentication.py
+++ b/tests/oauth2/rfc6749/endpoints/test_client_authentication.py
@@ -9,8 +9,6 @@ We make sure authentication is done by requiring a client object to be set
on the request object with a client_id parameter. The client_id attribute
prevents this check from being circumvented with a client form parameter.
"""
-from __future__ import absolute_import, unicode_literals
-
import json
import mock
diff --git a/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py b/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py
index e7c66b6..bda71f7 100644
--- a/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py
+++ b/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py
@@ -3,8 +3,6 @@
The Authorization Code Grant will need to preserve state as well as redirect
uri and the Implicit Grant will need to preserve state.
"""
-from __future__ import absolute_import, unicode_literals
-
import json
import mock
diff --git a/tests/oauth2/rfc6749/endpoints/test_error_responses.py b/tests/oauth2/rfc6749/endpoints/test_error_responses.py
index 2479836..cdf2b63 100644
--- a/tests/oauth2/rfc6749/endpoints/test_error_responses.py
+++ b/tests/oauth2/rfc6749/endpoints/test_error_responses.py
@@ -1,7 +1,5 @@
"""Ensure the correct error responses are returned for all defined error types.
"""
-from __future__ import absolute_import, unicode_literals
-
import json
import mock
diff --git a/tests/oauth2/rfc6749/endpoints/test_extra_credentials.py b/tests/oauth2/rfc6749/endpoints/test_extra_credentials.py
index a12fcd2..6895dcd 100644
--- a/tests/oauth2/rfc6749/endpoints/test_extra_credentials.py
+++ b/tests/oauth2/rfc6749/endpoints/test_extra_credentials.py
@@ -1,7 +1,5 @@
"""Ensure extra credentials can be supplied for inclusion in tokens.
"""
-from __future__ import absolute_import, unicode_literals
-
import mock
from oauthlib.oauth2 import (BackendApplicationServer, LegacyApplicationServer,
diff --git a/tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py b/tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py
index ae3deae..0942d96 100644
--- a/tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py
+++ b/tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
-from __future__ import absolute_import, unicode_literals
-
from json import loads
from mock import MagicMock
diff --git a/tests/oauth2/rfc6749/endpoints/test_metadata.py b/tests/oauth2/rfc6749/endpoints/test_metadata.py
index 4813b46..a01500f 100644
--- a/tests/oauth2/rfc6749/endpoints/test_metadata.py
+++ b/tests/oauth2/rfc6749/endpoints/test_metadata.py
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
-from __future__ import absolute_import, unicode_literals
-
from oauthlib.oauth2 import MetadataEndpoint
from oauthlib.oauth2 import TokenEndpoint
from oauthlib.oauth2 import Server
diff --git a/tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py b/tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py
index e823286..9e9d836 100644
--- a/tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py
+++ b/tests/oauth2/rfc6749/endpoints/test_resource_owner_association.py
@@ -1,7 +1,5 @@
"""Ensure all tokens are associated with a resource owner.
"""
-from __future__ import absolute_import, unicode_literals
-
import json
import mock
diff --git a/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py b/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py
index 17be3a5..0e3b2e1 100644
--- a/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py
+++ b/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
-from __future__ import absolute_import, unicode_literals
-
from json import loads
from mock import MagicMock
diff --git a/tests/oauth2/rfc6749/endpoints/test_scope_handling.py b/tests/oauth2/rfc6749/endpoints/test_scope_handling.py
index 4f27963..65e0e3c 100644
--- a/tests/oauth2/rfc6749/endpoints/test_scope_handling.py
+++ b/tests/oauth2/rfc6749/endpoints/test_scope_handling.py
@@ -3,8 +3,6 @@
Fairly trivial in all grants except the Authorization Code Grant where scope
need to be persisted temporarily in an authorization code.
"""
-from __future__ import absolute_import, unicode_literals
-
import json
import mock
@@ -65,13 +63,13 @@ class TestScopeHandling(TestCase):
for scope, correct_scopes in scopes:
scopes, _ = self.web.validate_authorization_request(
uri % (scope, 'code'))
- self.assertItemsEqual(scopes, correct_scopes)
+ self.assertCountEqual(scopes, correct_scopes)
scopes, _ = self.mobile.validate_authorization_request(
uri % (scope, 'token'))
- self.assertItemsEqual(scopes, correct_scopes)
+ self.assertCountEqual(scopes, correct_scopes)
scopes, _ = self.server.validate_authorization_request(
uri % (scope, 'code'))
- self.assertItemsEqual(scopes, correct_scopes)
+ self.assertCountEqual(scopes, correct_scopes)
def test_scope_preservation(self):
scope = 'pics+http%3A%2f%2fa.b%2fvideos'
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):