Skip to content

Commit

Permalink
Merge branch 'master' into bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanHuot committed Sep 14, 2018
2 parents 8aa8956 + 03bbcca commit 3787076
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/openid/connect/core/grant_types/test_dispatchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@ def test_create_authorization_response_openid(self):
self.request.scopes = ('hello', 'openid')
self.request.response_type = 'id_token'
handler = self.dispatcher._handler_for_request(self.request)
self.assertTrue(isinstance(handler, ImplicitGrant))
self.assertIsInstance(handler, ImplicitGrant)

def test_validate_authorization_request_openid(self):
self.request.scopes = ('hello', 'openid')
self.request.response_type = 'id_token'
handler = self.dispatcher._handler_for_request(self.request)
self.assertTrue(isinstance(handler, ImplicitGrant))
self.assertIsInstance(handler, ImplicitGrant)

def test_create_authorization_response_oauth(self):
self.request.scopes = ('hello', 'world')
handler = self.dispatcher._handler_for_request(self.request)
self.assertTrue(isinstance(handler, ImplicitGrant))
self.assertIsInstance(handler, ImplicitGrant)

def test_validate_authorization_request_oauth(self):
self.request.scopes = ('hello', 'world')
handler = self.dispatcher._handler_for_request(self.request)
self.assertTrue(isinstance(handler, ImplicitGrant))
self.assertIsInstance(handler, ImplicitGrant)


class DispatcherTest(TestCase):
Expand Down Expand Up @@ -82,7 +82,7 @@ def setUp(self):

def test_create_token_response_openid(self):
handler = self.dispatcher._handler_for_request(self.request)
self.assertTrue(isinstance(handler, AuthorizationCodeGrant))
self.assertIsInstance(handler, AuthorizationCodeGrant)
self.assertTrue(self.dispatcher.request_validator.get_authorization_code_scopes.called)


Expand All @@ -104,7 +104,7 @@ def setUp(self):

def test_create_token_response_openid_without_code(self):
handler = self.dispatcher._handler_for_request(self.request)
self.assertTrue(isinstance(handler, OAuth2AuthorizationCodeGrant))
self.assertIsInstance(handler, OAuth2AuthorizationCodeGrant)
self.assertFalse(self.dispatcher.request_validator.get_authorization_code_scopes.called)


Expand All @@ -121,5 +121,5 @@ def setUp(self):

def test_create_token_response_oauth(self):
handler = self.dispatcher._handler_for_request(self.request)
self.assertTrue(isinstance(handler, OAuth2AuthorizationCodeGrant))
self.assertIsInstance(handler, OAuth2AuthorizationCodeGrant)
self.assertTrue(self.dispatcher.request_validator.get_authorization_code_scopes.called)

0 comments on commit 3787076

Please sign in to comment.