Skip to content

Commit eac5d23

Browse files
Merge pull request #440 from okta/OKTA-898539
Allow latest aenum release
2 parents 597908a + 7f8918f commit eac5d23

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ pytest-asyncio
1616
pytest-mock
1717
pytest-recording
1818
pyfakefs
19-
aenum==3.1.11
19+
aenum
2020
pydash

tests/integration/test_org_it.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ async def test_get_org_contact_types(self, fs):
8181
@pytest.mark.asyncio
8282
async def test_get_org_contact_user(self, fs):
8383
client = MockOktaClient(fs)
84-
contact_type = OrgContactType('BILLING')
84+
contact_type = OrgContactType.BILLING.value
8585
org_contact_user, _, err = await client.get_org_contact_user(contact_type)
8686
assert err is None
8787
assert isinstance(org_contact_user, OrgContactUser)
@@ -91,11 +91,11 @@ async def test_get_org_contact_user(self, fs):
9191
@pytest.mark.asyncio
9292
async def test_update_org_contact_user(self, fs):
9393
client = MockOktaClient(fs)
94-
contact_type = OrgContactType('BILLING')
94+
contact_type = OrgContactType.BILLING.value
9595
org_contact_user, _, err = await client.get_org_contact_user(contact_type)
9696
assert err is None
9797

98-
new_contact_type = OrgContactType('TECHNICAL')
98+
new_contact_type = OrgContactType.TECHNICAL.value
9999
try:
100100
updated_user, _, err = await client.update_org_contact_user(new_contact_type,
101101
UserIdString({'userId': org_contact_user.user_id}))

tests/integration/test_subscription_it.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)