Fake deprecated nova client properties

Mox doesn't like the new nova client python properties that
were recently added to handle deprecations; just fake them out.

- UnknownMethodCallError: Method called is not a member of the object:
projectid

Change-Id: Iea69ee5c4a8f40eadc15391938443b04116cb3c3
This commit is contained in:
Diana Clarke 2017-01-18 10:45:50 -05:00
parent f321f6c1a6
commit d3d89c9421
1 changed files with 2 additions and 0 deletions

View File

@ -444,6 +444,8 @@ class APITestCase(TestCase):
# compatible to 2.0 anyway.
api_version = nova_api_versions.APIVersion('2.1')
nova_client.Client.api_version = api_version
nova_client.Client.projectid = 'fake_project'
nova_client.Client.tenant_id = 'fake_tenant'
self.novaclient = self.mox.CreateMock(nova_client.Client)
return self.novaclient