summaryrefslogtreecommitdiffstats
path: root/tests/test_backend.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-04-12 05:54:36 +0000
committerGerrit Code Review <review@openstack.org>2013-04-12 05:54:36 +0000
commit9834d776b6badfc1dd6dc65dd1a761d7008bc2ff (patch)
tree83947918bd3d151b61be54cc5c9d8c024ff86118 /tests/test_backend.py
parent49123838d797d3e07b57a8abb508bc016c2dfd59 (diff)
parente16742bdf2f1fa7386f2983b037a78fde4a576c3 (diff)
downloadkeystone-9834d776b6badfc1dd6dc65dd1a761d7008bc2ff.tar.gz
keystone-9834d776b6badfc1dd6dc65dd1a761d7008bc2ff.tar.xz
keystone-9834d776b6badfc1dd6dc65dd1a761d7008bc2ff.zip
Merge "residual grants after delete action (bug1125637)"
Diffstat (limited to 'tests/test_backend.py')
-rw-r--r--tests/test_backend.py33
1 files changed, 16 insertions, 17 deletions
diff --git a/tests/test_backend.py b/tests/test_backend.py
index fea52b8e..6768e9c5 100644
--- a/tests/test_backend.py
+++ b/tests/test_backend.py
@@ -1136,7 +1136,6 @@ class IdentityTests(object):
self.assertIn(role_list[7], roles_ref)
def test_delete_role_with_user_and_group_grants(self):
- raise nose.exc.SkipTest('Blocked by bug 1097472')
role1 = {'id': uuid.uuid4().hex, 'name': uuid.uuid4().hex}
self.identity_api.create_role(role1['id'], role1)
domain1 = {'id': uuid.uuid4().hex, 'name': uuid.uuid4().hex}
@@ -1180,22 +1179,22 @@ class IdentityTests(object):
domain_id=domain1['id'])
self.assertEquals(len(roles_ref), 1)
self.identity_api.delete_role(role1['id'])
- self.assertRaises(exception.RoleNotFound,
- self.identity_api.list_grants,
- user_id=user1['id'],
- project_id=project1['id'])
- self.assertRaises(exception.RoleNotFound,
- self.identity_api.list_grants,
- group_id=group1['id'],
- project_id=project1['id'])
- self.assertRaises(exception.RoleNotFound,
- self.identity_api.list_grants,
- user_id=user1['id'],
- domain_id=domain1['id'])
- self.assertRaises(exception.RoleNotFound,
- self.identity_api.list_grants,
- group_id=group1['id'],
- domain_id=domain1['id'])
+ roles_ref = self.identity_api.list_grants(
+ user_id=user1['id'],
+ project_id=project1['id'])
+ self.assertEquals(len(roles_ref), 0)
+ roles_ref = self.identity_api.list_grants(
+ group_id=group1['id'],
+ project_id=project1['id'])
+ self.assertEquals(len(roles_ref), 0)
+ roles_ref = self.identity_api.list_grants(
+ user_id=user1['id'],
+ domain_id=domain1['id'])
+ self.assertEquals(len(roles_ref), 0)
+ roles_ref = self.identity_api.list_grants(
+ group_id=group1['id'],
+ domain_id=domain1['id'])
+ self.assertEquals(len(roles_ref), 0)
def test_delete_user_with_group_project_domain_links(self):
role1 = {'id': uuid.uuid4().hex, 'name': uuid.uuid4().hex}