@@ -36,23 +36,23 @@ def test_create_authorization_response_openid(self):
36
36
self .request .scopes = ('hello' , 'openid' )
37
37
self .request .response_type = 'id_token'
38
38
handler = self .dispatcher ._handler_for_request (self .request )
39
- self .assertTrue ( isinstance ( handler , ImplicitGrant ) )
39
+ self .assertIsInstance ( handler , ImplicitGrant )
40
40
41
41
def test_validate_authorization_request_openid (self ):
42
42
self .request .scopes = ('hello' , 'openid' )
43
43
self .request .response_type = 'id_token'
44
44
handler = self .dispatcher ._handler_for_request (self .request )
45
- self .assertTrue ( isinstance ( handler , ImplicitGrant ) )
45
+ self .assertIsInstance ( handler , ImplicitGrant )
46
46
47
47
def test_create_authorization_response_oauth (self ):
48
48
self .request .scopes = ('hello' , 'world' )
49
49
handler = self .dispatcher ._handler_for_request (self .request )
50
- self .assertTrue ( isinstance ( handler , ImplicitGrant ) )
50
+ self .assertIsInstance ( handler , ImplicitGrant )
51
51
52
52
def test_validate_authorization_request_oauth (self ):
53
53
self .request .scopes = ('hello' , 'world' )
54
54
handler = self .dispatcher ._handler_for_request (self .request )
55
- self .assertTrue ( isinstance ( handler , ImplicitGrant ) )
55
+ self .assertIsInstance ( handler , ImplicitGrant )
56
56
57
57
58
58
class DispatcherTest (TestCase ):
@@ -82,7 +82,7 @@ def setUp(self):
82
82
83
83
def test_create_token_response_openid (self ):
84
84
handler = self .dispatcher ._handler_for_request (self .request )
85
- self .assertTrue ( isinstance ( handler , AuthorizationCodeGrant ) )
85
+ self .assertIsInstance ( handler , AuthorizationCodeGrant )
86
86
self .assertTrue (self .dispatcher .request_validator .get_authorization_code_scopes .called )
87
87
88
88
@@ -104,7 +104,7 @@ def setUp(self):
104
104
105
105
def test_create_token_response_openid_without_code (self ):
106
106
handler = self .dispatcher ._handler_for_request (self .request )
107
- self .assertTrue ( isinstance ( handler , OAuth2AuthorizationCodeGrant ) )
107
+ self .assertIsInstance ( handler , OAuth2AuthorizationCodeGrant )
108
108
self .assertFalse (self .dispatcher .request_validator .get_authorization_code_scopes .called )
109
109
110
110
@@ -121,5 +121,5 @@ def setUp(self):
121
121
122
122
def test_create_token_response_oauth (self ):
123
123
handler = self .dispatcher ._handler_for_request (self .request )
124
- self .assertTrue ( isinstance ( handler , OAuth2AuthorizationCodeGrant ) )
124
+ self .assertIsInstance ( handler , OAuth2AuthorizationCodeGrant )
125
125
self .assertTrue (self .dispatcher .request_validator .get_authorization_code_scopes .called )
0 commit comments