Fix teardown of the identity api
Commit 03f09f989b removed the
_try_wrapper function, which added ['id'] to all wrapped objects.
Re-add this to correctly pass the id of the object to the delete
functions, instead of the whole object.
Change-Id: I29b4995c8599e6906b40fc14f0977302b649cc65
This commit is contained in:
committed by
Gyorgy Szombathelyi
parent
6406a4432d
commit
edb0a3b8fd
@@ -218,21 +218,21 @@ class BaseDataGenerator(object):
|
||||
def teardown_all(self):
|
||||
for user in self.users:
|
||||
test_utils.call_and_ignore_notfound_exc(
|
||||
self.users_client.delete_user, user)
|
||||
self.users_client.delete_user, user['id'])
|
||||
for tenant in self.tenants:
|
||||
test_utils.call_and_ignore_notfound_exc(
|
||||
self.projects_client.delete_tenant, tenant)
|
||||
self.projects_client.delete_tenant, tenant['id'])
|
||||
for project in reversed(self.projects):
|
||||
test_utils.call_and_ignore_notfound_exc(
|
||||
self.projects_client.delete_project, project)
|
||||
self.projects_client.delete_project, project['id'])
|
||||
for role in self.roles:
|
||||
test_utils.call_and_ignore_notfound_exc(
|
||||
self.roles_client.delete_role, role)
|
||||
self.roles_client.delete_role, role['id'])
|
||||
for domain in self.domains:
|
||||
test_utils.call_and_ignore_notfound_exc(
|
||||
self.domains_client.update_domain, domain, enabled=False)
|
||||
self.domains_client.update_domain, domain['id'], enabled=False)
|
||||
test_utils.call_and_ignore_notfound_exc(
|
||||
self.domains_client.delete_domain, domain)
|
||||
self.domains_client.delete_domain, domain['id'])
|
||||
|
||||
|
||||
class DataGeneratorV2(BaseDataGenerator):
|
||||
|
||||
Reference in New Issue
Block a user