@@ -26,31 +26,31 @@ async def test_list_role_subsription(self, fs):
2626 async def test_get_role_subscription_by_notification_type (self , fs ):
2727 # Instantiate Mock Client
2828 client = MockOktaClient (fs )
29- notification_type = models .NotificationType ( ' OKTA_ISSUE' )
29+ notification_type = models .NotificationType . OKTA_ISSUE . value
3030 resp , _ , err = await client .get_role_subscription_by_notification_type ('SUPER_ADMIN' , notification_type )
3131 assert isinstance (resp , models .Subscription )
32- assert resp .notification_type == models .NotificationType ( ' OKTA_ISSUE' )
32+ assert resp .notification_type == models .NotificationType . OKTA_ISSUE . value
3333
3434 @pytest .mark .vcr ()
3535 @pytest .mark .asyncio
3636 async def test_subscribe_unsubscribe_role_by_notification_type (self , fs ):
3737 # Instantiate Mock Client
3838 client = MockOktaClient (fs )
39- notification_type = models .NotificationType ( ' OKTA_ISSUE' )
39+ notification_type = models .NotificationType . OKTA_ISSUE . value
4040 _ , err = await client .subscribe_role_subscription_by_notification_type ('SUPER_ADMIN' , notification_type )
4141 assert err is None
4242
4343 resp , _ , err = await client .get_role_subscription_by_notification_type ('SUPER_ADMIN' , notification_type )
4444 assert isinstance (resp , models .Subscription )
45- assert resp .notification_type == models .NotificationType ( ' OKTA_ISSUE' )
45+ assert resp .notification_type == models .NotificationType . OKTA_ISSUE . value
4646 assert resp .status == models .SubscriptionStatus ('SUBSCRIBED' )
4747
4848 try :
4949 _ , err = await client .unsubscribe_role_subscription_by_notification_type ('SUPER_ADMIN' , notification_type )
5050 assert err is None
5151 resp , _ , err = await client .get_role_subscription_by_notification_type ('SUPER_ADMIN' , notification_type )
5252 assert isinstance (resp , models .Subscription )
53- assert resp .notification_type == models .NotificationType ( ' OKTA_ISSUE' )
53+ assert resp .notification_type == models .NotificationType . OKTA_ISSUE . value
5454 assert resp .status == models .SubscriptionStatus ('UNSUBSCRIBED' )
5555
5656 finally :
@@ -68,17 +68,17 @@ async def test_subscribe_unsubscribe_user(self, fs):
6868 assert err is None
6969 user = users [0 ]
7070
71- notification_type = models .NotificationType ( ' OKTA_ISSUE' )
71+ notification_type = models .NotificationType . OKTA_ISSUE . value
7272 _ , err = await client .subscribe_user_subscription_by_notification_type (user .id , notification_type )
7373 assert err is None
7474
7575 resp , _ , err = await client .get_user_subscription_by_notification_type (user .id , notification_type )
76- assert resp .notification_type == models .NotificationType ( ' OKTA_ISSUE' )
76+ assert resp .notification_type == models .NotificationType . OKTA_ISSUE . value
7777 assert resp .status == models .SubscriptionStatus ('SUBSCRIBED' )
7878
7979 _ , err = await client .unsubscribe_user_subscription_by_notification_type (user .id , notification_type )
8080 assert err is None
8181
8282 resp , _ , err = await client .get_user_subscription_by_notification_type (user .id , notification_type )
83- assert resp .notification_type == models .NotificationType ( ' OKTA_ISSUE' )
83+ assert resp .notification_type == models .NotificationType . OKTA_ISSUE . value
8484 assert resp .status == models .SubscriptionStatus ('UNSUBSCRIBED' )
0 commit comments