summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheron Luhn <theron@luhn.com>2018-09-03 22:19:30 -0700
committerTheron Luhn <theron@luhn.com>2018-09-03 22:19:30 -0700
commitfd5c9790e8219fdc6a85b4837ba4f5a2eb265d09 (patch)
tree88168321f75bf9464c0687c8eb068761e2172368
parentf7df56a9286b3fd06d636ef43ab3d4a4c86c1918 (diff)
downloadoauthlib-fd5c9790e8219fdc6a85b4837ba4f5a2eb265d09.tar.gz
Write a test for authorization grant w/ no scope.
-rw-r--r--tests/oauth2/rfc6749/grant_types/test_authorization_code.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/oauth2/rfc6749/grant_types/test_authorization_code.py b/tests/oauth2/rfc6749/grant_types/test_authorization_code.py
index 704a254..acb23ac 100644
--- a/tests/oauth2/rfc6749/grant_types/test_authorization_code.py
+++ b/tests/oauth2/rfc6749/grant_types/test_authorization_code.py
@@ -77,6 +77,12 @@ class AuthorizationCodeGrantTest(TestCase):
self.assertTrue(self.mock_validator.validate_response_type.called)
self.assertTrue(self.mock_validator.validate_scopes.called)
+ def test_create_authorization_grant_no_scopes(self):
+ bearer = BearerToken(self.mock_validator)
+ self.request.response_mode = 'query'
+ self.request.scopes = []
+ self.auth.create_authorization_response(self.request, bearer)
+
def test_create_authorization_grant_state(self):
self.request.state = 'abc'
self.request.redirect_uri = None