'Cleanup on a resource that\'s been claimed by other service.'

def test_do_cleanup_resource_on_another_service(self):

    vol = utils.create_volume(self.context, status='deleting')
    db.worker_create(self.context, status='deleting', resource_type='Volume', resource_id=vol.id, service_id=(self.service.id + 1))
    clean_req = objects.CleanupRequest(service_id=self.service.id)
    mngr = FakeManager(self.service.id)
    mngr.do_cleanup(self.context, clean_req)
    workers = db.worker_get_all(self.context)
    self.assertEqual(1, len(workers))
    vol.refresh()
    self.assertEqual('deleting', vol.status)
