Merge "[Unity] Fix TypeError for test case test_delete_host_wo_lock" into stable/stein

This commit is contained in:
Zuul 2020-03-30 13:53:40 +00:00 committed by Gerrit Code Review
commit ef2011b9cf
1 changed files with 3 additions and 2 deletions

View File

@ -65,7 +65,7 @@ class MockResource(object):
raise ex.UnityResourceNotFoundError()
elif self.get_id() == 'snap_in_use':
raise ex.UnityDeleteAttachedSnapError()
elif self.name == 'empty_host':
elif self.name == 'empty-host':
raise ex.HostDeleteIsCalled()
@property
@ -584,7 +584,8 @@ class ClientTest(unittest.TestCase):
host = MockResource(name='empty-host')
self.client.host_cache['empty-host'] = host
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):
host = MockResource(name='empty-host-in-cache')