From 49109f1ccaefa99535cf0a3bad2b9b4f7d9534cd Mon Sep 17 00:00:00 2001 From: Morgan Fainberg Date: Sun, 29 Jun 2014 09:58:30 -0700 Subject: [PATCH] Fix test for get_*_by_name invalidation Use the correct .get_*by_name method for project and domain to populate the cache instead of get by id when testing. Change-Id: Ie1c02183688b0d928edc8d9c90a785cd98998377 Related-Bug: #1311142 --- keystone/tests/test_backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keystone/tests/test_backend.py b/keystone/tests/test_backend.py index 7471550fb9..2f2cc983f6 100644 --- a/keystone/tests/test_backend.py +++ b/keystone/tests/test_backend.py @@ -2654,7 +2654,7 @@ class IdentityTests(object): domain_id = domain['id'] domain_name = domain['name'] self.assignment_api.create_domain(domain_id, domain) - domain_ref = self.assignment_api.get_domain(domain_id) + domain_ref = self.assignment_api.get_domain_by_name(domain_name) domain_ref['name'] = uuid.uuid4().hex self.assignment_api.update_domain(domain_id, domain_ref) self.assertRaises(exception.DomainNotFound, @@ -2727,7 +2727,7 @@ class IdentityTests(object): self.assignment_api.create_domain(domain['id'], domain) # Create a project self.assignment_api.create_project(project_id, project) - self.assignment_api.get_project(project_id) + self.assignment_api.get_project_by_name(project_name, domain['id']) project['name'] = uuid.uuid4().hex self.assignment_api.update_project(project_id, project) self.assertRaises(exception.ProjectNotFound,