'init_host will resume deleting volume in deleting status.'

@mock.patch('cinder.image.image_utils.cleanup_temporary_file')
def test_init_host_resumes_deletes(self, mock_cleanup_tmp_file):

    volume = tests_utils.create_volume(self.context, status='deleting', size=0, host=CONF.host)
    db.worker_create(self.context, resource_type='Volume', resource_id=volume.id, status=volume.status, service_id=self.service_id)
    self.volume.init_host(service_id=service.Service.service_id)
    self.assertRaises(exception.VolumeNotFound, db.volume_get, context.get_admin_context(), volume.id)
    mock_cleanup_tmp_file.assert_called_once_with(CONF.host)
    self._assert_workers_are_removed()
