From d0dfafea57425bcdd3c440317a76fcbdae1eed0b Mon Sep 17 00:00:00 2001 From: Ala Rezmerita Date: Fri, 18 Apr 2014 15:52:24 +0200 Subject: [PATCH] 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 --- novaclient/tests/v3/fakes.py | 4 ++-- novaclient/tests/v3/test_hypervisors.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/novaclient/tests/v3/fakes.py b/novaclient/tests/v3/fakes.py index be3727452..43b5e05e7 100644 --- a/novaclient/tests/v3/fakes.py +++ b/novaclient/tests/v3/fakes.py @@ -332,8 +332,8 @@ class FakeHTTPClient(fakes_v1_1.FakeHTTPClient): {'id': 1234, 'hypervisor_hostname': 'hyper1', 'servers': [ - {'name': 'inst1', 'uuid': 'uuid1'}, - {'name': 'inst2', 'uuid': 'uuid2'} + {'name': 'inst1', 'id': 'uuid1'}, + {'name': 'inst2', 'id': 'uuid2'} ]}, }) diff --git a/novaclient/tests/v3/test_hypervisors.py b/novaclient/tests/v3/test_hypervisors.py index d2cbbb9ac..97e69a8a1 100644 --- a/novaclient/tests/v3/test_hypervisors.py +++ b/novaclient/tests/v3/test_hypervisors.py @@ -41,8 +41,8 @@ class HypervisorsTest(test_hypervisors.HypervisorsTest): expected = dict(id=1234, hypervisor_hostname='hyper1', servers=[ - dict(name='inst1', uuid='uuid1'), - dict(name='inst2', uuid='uuid2')]) + dict(name='inst1', id='uuid1'), + dict(name='inst2', id='uuid2')]) result = self.cs.hypervisors.servers('1234') self.cs.assert_called('GET', '/os-hypervisors/1234/servers')