Browse Source

Merge "Keystone - List user groups 'membership_expires_at' attribute"

tags/24.0.0
Zuul 2 months ago
committed by Gerrit Code Review
parent
commit
91f0e00882
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      tempest/api/identity/admin/v3/test_groups.py

+ 7
- 0
tempest/api/identity/admin/v3/test_groups.py View File

@@ -114,6 +114,13 @@ class GroupsV3TestJSON(base.BaseIdentityV3AdminTest):
self.groups_client.add_group_user(group['id'], user['id'])
# list groups which user belongs to
user_groups = self.users_client.list_user_groups(user['id'])['groups']
# The `membership_expires_at` attribute is present when listing user
# group memberships, and is not an attribute of the groups themselves.
# Therefore we remove it from the comparison.
for g in user_groups:
if 'membership_expires_at' in g:
self.assertIsNone(g['membership_expires_at'])
del(g['membership_expires_at'])
self.assertEqual(sorted(groups, key=lambda k: k['name']),
sorted(user_groups, key=lambda k: k['name']))
self.assertEqual(2, len(user_groups))


Loading…
Cancel
Save