Fix failing nova_tests tests
Mock also compute.conductor_api.instance_destroy() to return an instance instead of a MagickMock object. Change-Id: I518e063abfdd568f7d9ef970bc371eced2198adf
This commit is contained in:
parent
d180ae8be6
commit
f509623e32
@ -221,8 +221,11 @@ class TestNovaNotifier(test.BaseTestCase):
|
|||||||
mock.patch('nova.openstack.common.notifier.rpc_notifier.notify',
|
mock.patch('nova.openstack.common.notifier.rpc_notifier.notify',
|
||||||
self.notify)
|
self.notify)
|
||||||
):
|
):
|
||||||
self.compute.terminate_instance(self.context,
|
with mock.patch.object(self.compute.conductor_api,
|
||||||
instance=self.instance)
|
'instance_destroy',
|
||||||
|
return_value=self.instance):
|
||||||
|
self.compute.terminate_instance(self.context,
|
||||||
|
instance=self.instance)
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
self.Pollster.instances = []
|
self.Pollster.instances = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user