Add the 'traits' parameter to pypowervm Response

A recent commit in pypowervm now requires a 'traits' parameter
to be specified on a Response object. Updated the unit tests
to supply 'None' since traits are not used in the testing.

Change-Id: I2272bb55b4575374ba93c77222531a9ce71afb3e
This commit is contained in:
Kyle L. Henderson 2015-04-24 17:21:56 -05:00
parent f49393106e
commit 0a67e33f62
3 changed files with 4 additions and 4 deletions

View File

@ -122,7 +122,7 @@ class TestSSPDiskAdapter(test.TestCase):
:return: pypowervm.adapter.Response suitable for mocking
pypowervm.adapter.Adapter.search or read.
"""
resp = pvm_adp.Response('meth', 'path', status, 'reason', {})
resp = pvm_adp.Response('meth', 'path', status, 'reason', {}, None)
resp.entry = None
resp.feed = None
if entry_or_list is None:

View File

@ -80,7 +80,7 @@ class TestPowerVMDriver(test.TestCase):
self.crt_lpar_p = mock.patch('nova_powervm.virt.powervm.vm.crt_lpar')
self.crt_lpar = self.crt_lpar_p.start()
resp = pvm_adp.Response('method', 'path', 'status', 'reason', {})
resp = pvm_adp.Response('method', 'path', 'status', 'reason', {}, None)
resp.entry = pvm_lpar.LPAR._bld().entry
self.crt_lpar.return_value = pvm_lpar.LPAR.wrap(resp)
@ -388,7 +388,7 @@ class TestPowerVMDriver(test.TestCase):
# Set up the mocks to the resize operation.
inst = objects.Instance(**powervm.TEST_INSTANCE)
host = self.drv.get_host_ip_addr()
resp = pvm_adp.Response('method', 'path', 'status', 'reason', {})
resp = pvm_adp.Response('method', 'path', 'status', 'reason', {}, None)
resp.entry = pvm_lpar.LPAR._bld().entry
self.apt.read.return_value = resp

View File

@ -71,7 +71,7 @@ class TestVM(test.TestCase):
cache.remove('n1')
self.assertEqual(cache.lookup('n1', fetch=False), None)
# Not in cache, search returns no results (empty feed)
emptyfeed = pvm_adp.Response('meth', 'path', 200, 'reason', {})
emptyfeed = pvm_adp.Response('meth', 'path', 200, 'reason', {}, None)
emptyfeed.feed = mock.MagicMock()
emptyfeed.feed.entries = []
self.apt.read.return_value = emptyfeed