Merge "[Unity] Fix TypeError for test case test_delete_host_wo_lock" into stable/queens
This commit is contained in:
commit
356681ccc0
|
@ -63,7 +63,7 @@ class MockResource(object):
|
||||||
raise ex.UnityResourceNotFoundError()
|
raise ex.UnityResourceNotFoundError()
|
||||||
elif self.get_id() == 'snap_in_use':
|
elif self.get_id() == 'snap_in_use':
|
||||||
raise ex.UnityDeleteAttachedSnapError()
|
raise ex.UnityDeleteAttachedSnapError()
|
||||||
elif self.name == 'empty_host':
|
elif self.name == 'empty-host':
|
||||||
raise ex.HostDeleteIsCalled()
|
raise ex.HostDeleteIsCalled()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -552,7 +552,8 @@ class ClientTest(unittest.TestCase):
|
||||||
host = MockResource(name='empty-host')
|
host = MockResource(name='empty-host')
|
||||||
self.client.host_cache['empty-host'] = host
|
self.client.host_cache['empty-host'] = host
|
||||||
self.assertRaises(ex.HostDeleteIsCalled,
|
self.assertRaises(ex.HostDeleteIsCalled,
|
||||||
self.client.delete_host_wo_lock(host))
|
self.client.delete_host_wo_lock,
|
||||||
|
host)
|
||||||
|
|
||||||
def test_delete_host_wo_lock_remove_from_cache(self):
|
def test_delete_host_wo_lock_remove_from_cache(self):
|
||||||
host = MockResource(name='empty-host-in-cache')
|
host = MockResource(name='empty-host-in-cache')
|
||||||
|
|
Loading…
Reference in New Issue