@@ -45,7 +45,8 @@ async def mock_response_text():
45
45
}
46
46
)
47
47
provisioning_conn_req = models .ProvisioningConnectionRequest ({'profile' : profile })
48
- _ = await client .set_default_provisioning_connection_for_application ('test_app_id' , provisioning_conn_req , query_params = {'activate' : True })
48
+ _ = await client .set_default_provisioning_connection_for_application ('test_app_id' , provisioning_conn_req ,
49
+ query_params = {'activate' : True })
49
50
assert mock_http_request .request_info ['url' ].endswith ('/apps/test_app_id/connections/default/?activate=True' )
50
51
data = mock_http_request .request_info ['data' ]
51
52
assert json .loads (data ) == {"profile" : {"authScheme" : "TOKEN" , "token" : "TEST" }}
@@ -133,6 +134,7 @@ async def mock_response_text():
133
134
assert isinstance (features [0 ].capabilities .update .password .change , models .ChangeEnum )
134
135
assert isinstance (features [0 ].status , models .EnabledStatus )
135
136
137
+
136
138
@pytest .mark .asyncio
137
139
async def test_get_feature_for_application (monkeypatch , mocker ):
138
140
mocked_response = """{
@@ -256,10 +258,10 @@ async def mock_response_text():
256
258
"lifecycleDeactivate" : {
257
259
"status" : "ENABLED"
258
260
},
259
- "profile" :{
261
+ "profile" : {
260
262
"status" : "ENABLED"
261
263
},
262
- "password" :{
264
+ "password" : {
263
265
"status" : "ENABLED" ,
264
266
"seed" : "RANDOM" ,
265
267
"change" : "CHANGE"
@@ -313,3 +315,20 @@ async def mock_response_text():
313
315
assert mock_http_request .request_info ['url' ].endswith ('/apps/test_app_id/logo' )
314
316
data = mock_http_request .request_info ['data' ]
315
317
assert data == {'file' : logo }
318
+
319
+ class TestOAuthGrantType :
320
+ """
321
+ Unit Tests for the OAuthGrantType Enum
322
+ """
323
+
324
+ def test_new_enum_types (self ):
325
+ # List of new ENUM types to be tested
326
+ new_enum_types = [
327
+ "urn:okta:params:oauth:grant-type:otp" ,
328
+ "urn:okta:params:oauth:grant-type:oob" ,
329
+ "http://auth0.com/oauth/grant-type/mfa-otp" ,
330
+ "http://auth0.com/oauth/grant-type/mfa-oob"
331
+ ]
332
+
333
+ for enum_type in new_enum_types :
334
+ assert enum_type in models .OAuthGrantType .__members__ .values ()
0 commit comments