diff options
author | Oren Mazor <oren.mazor@gmail.com> | 2017-06-14 12:22:27 -0400 |
---|---|---|
committer | Oren Mazor <oren.mazor@gmail.com> | 2017-06-14 13:21:28 -0400 |
commit | 3dc0f8e2048c9dd4d2eb5ca1b0b2eaefd47b09d6 (patch) | |
tree | 87da62c43c46989f65e0a5bf37a575a38698cc95 | |
parent | 2bcb8754980d7eb54ba12a34ead1694baa12340b (diff) | |
download | oauthlib-3dc0f8e2048c9dd4d2eb5ca1b0b2eaefd47b09d6.tar.gz |
adjust the test for the new exception
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py b/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py index 98a132a..89350be 100644 --- a/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py +++ b/tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py @@ -77,7 +77,7 @@ class PreservationTest(TestCase): code = get_query_credentials(h['Location'])['code'][0] _, body, _ = self.web.create_token_response(token_uri, body='grant_type=authorization_code&code=%s' % code) - self.assertEqual(json.loads(body)['error'], 'access_denied') + self.assertEqual(json.loads(body)['error'], 'invalid_request') # implicit grant h, _, s = self.mobile.create_authorization_response( diff --git a/tests/oauth2/rfc6749/endpoints/test_error_responses.py b/tests/oauth2/rfc6749/endpoints/test_error_responses.py index 9a8a890..e57aea6 100644 --- a/tests/oauth2/rfc6749/endpoints/test_error_responses.py +++ b/tests/oauth2/rfc6749/endpoints/test_error_responses.py @@ -240,7 +240,7 @@ class ErrorResponseTest(TestCase): # Authorization code grant _, body, _ = self.web.create_token_response(token_uri, body='grant_type=authorization_code&code=foo') - self.assertEqual('access_denied', json.loads(body)['error']) + self.assertEqual('invalid_request', json.loads(body)['error']) def test_unsupported_response_type(self): self.validator.get_default_redirect_uri.return_value = 'https://i.b/cb' diff --git a/tests/oauth2/rfc6749/grant_types/test_authorization_code.py b/tests/oauth2/rfc6749/grant_types/test_authorization_code.py index c5e6869..dbfa2fe 100644 --- a/tests/oauth2/rfc6749/grant_types/test_authorization_code.py +++ b/tests/oauth2/rfc6749/grant_types/test_authorization_code.py @@ -186,5 +186,5 @@ class AuthorizationCodeGrantTest(TestCase): def test_invalid_redirect_uri(self): self.mock_validator.confirm_redirect_uri.return_value = False - self.assertRaises(errors.AccessDeniedError, + self.assertRaises(errors.MismatchingRedirectURIError, self.auth.validate_token_request, self.request) |