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',
|
||||
self.notify)
|
||||
):
|
||||
self.compute.terminate_instance(self.context,
|
||||
instance=self.instance)
|
||||
with mock.patch.object(self.compute.conductor_api,
|
||||
'instance_destroy',
|
||||
return_value=self.instance):
|
||||
self.compute.terminate_instance(self.context,
|
||||
instance=self.instance)
|
||||
|
||||
def tearDown(self):
|
||||
self.Pollster.instances = []
|
||||
|
Loading…
Reference in New Issue
Block a user