Tests update FakeKeystoneClient to align user_id and trustor

When creating the dummy trust context, we return an arbitrary
hard-coded trustor_user_id, which makes testing we do things
with the trustor correctly difficult, so instead return the
user_id passed into the client (as this is what the trustor id
will be when real create_trust_context calls happen)

Change-Id: I280b820977bfc533126fe392e002210a996311f0
This commit is contained in:
Steven Hardy 2014-09-09 12:11:10 +01:00
parent 35d7465c11
commit 4d42c7c389
2 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ class FakeKeystoneClient(object):
password=self.password,
is_admin=False,
trust_id='atrust',
trustor_user_id='auser123')
trustor_user_id=self.user_id)
def delete_trust(self, trust_id):
pass

View File

@ -3630,7 +3630,7 @@ class StackTest(HeatTestCase):
self.m.StubOutWithMock(keystone.KeystoneClientPlugin, '_create')
keystone.KeystoneClientPlugin._create().AndReturn(
FakeKeystoneClient())
FakeKeystoneClient(user_id='auser123'))
self.m.ReplayAll()
self.stack = parser.Stack(