Fix wrong fake return values for Nova V3 client tests

The response format for the hypervisor servers list action in
Nova API V3 has changed. This patch corrects the fake return
values used for client testing.

Change-Id: I645607b5adcfe3fa1c1d1efc071c87d2bb2b37b5
Closes-Bug: #1309542
This commit is contained in:
Ala Rezmerita 2014-04-18 15:52:24 +02:00
parent 5ff5e05fac
commit d0dfafea57
2 changed files with 4 additions and 4 deletions

View File

@ -332,8 +332,8 @@ class FakeHTTPClient(fakes_v1_1.FakeHTTPClient):
{'id': 1234, {'id': 1234,
'hypervisor_hostname': 'hyper1', 'hypervisor_hostname': 'hyper1',
'servers': [ 'servers': [
{'name': 'inst1', 'uuid': 'uuid1'}, {'name': 'inst1', 'id': 'uuid1'},
{'name': 'inst2', 'uuid': 'uuid2'} {'name': 'inst2', 'id': 'uuid2'}
]}, ]},
}) })

View File

@ -41,8 +41,8 @@ class HypervisorsTest(test_hypervisors.HypervisorsTest):
expected = dict(id=1234, expected = dict(id=1234,
hypervisor_hostname='hyper1', hypervisor_hostname='hyper1',
servers=[ servers=[
dict(name='inst1', uuid='uuid1'), dict(name='inst1', id='uuid1'),
dict(name='inst2', uuid='uuid2')]) dict(name='inst2', id='uuid2')])
result = self.cs.hypervisors.servers('1234') result = self.cs.hypervisors.servers('1234')
self.cs.assert_called('GET', '/os-hypervisors/1234/servers') self.cs.assert_called('GET', '/os-hypervisors/1234/servers')