@@ -45,7 +45,8 @@ async def mock_response_text():
4545 }
4646 )
4747 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 })
4950 assert mock_http_request .request_info ['url' ].endswith ('/apps/test_app_id/connections/default/?activate=True' )
5051 data = mock_http_request .request_info ['data' ]
5152 assert json .loads (data ) == {"profile" : {"authScheme" : "TOKEN" , "token" : "TEST" }}
@@ -133,6 +134,7 @@ async def mock_response_text():
133134 assert isinstance (features [0 ].capabilities .update .password .change , models .ChangeEnum )
134135 assert isinstance (features [0 ].status , models .EnabledStatus )
135136
137+
136138@pytest .mark .asyncio
137139async def test_get_feature_for_application (monkeypatch , mocker ):
138140 mocked_response = """{
@@ -256,10 +258,10 @@ async def mock_response_text():
256258 "lifecycleDeactivate" : {
257259 "status" : "ENABLED"
258260 },
259- "profile" :{
261+ "profile" : {
260262 "status" : "ENABLED"
261263 },
262- "password" :{
264+ "password" : {
263265 "status" : "ENABLED" ,
264266 "seed" : "RANDOM" ,
265267 "change" : "CHANGE"
@@ -313,3 +315,20 @@ async def mock_response_text():
313315 assert mock_http_request .request_info ['url' ].endswith ('/apps/test_app_id/logo' )
314316 data = mock_http_request .request_info ['data' ]
315317 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