'Test worker claim of normal DB entry.'

def test_worker_claim(self):

    service_id = 1
    worker = db.worker_create(self.ctxt, resource_type='Volume', resource_id=fake.VOLUME_ID, status='deleting')
    res = db.worker_claim_for_cleanup(self.ctxt, service_id, worker)
    self.assertEqual(1, res)
    db_worker = db.worker_get(self.ctxt, id=worker.id)
    self._assertEqualObjects(worker, db_worker, ['updated_at'])
    self.assertEqual(service_id, db_worker.service_id)
    self.assertEqual(worker.service_id, db_worker.service_id)
