'Test when we use an already existing resource type and id.'

def test_worker_create_unique_constrains(self):

    db.worker_create(self.ctxt, **self.worker_fields)
    self.assertRaises(exception.WorkerExists, db.worker_create, self.ctxt, resource_type=self.worker_fields['resource_type'], resource_id=self.worker_fields['resource_id'], status=('not_' + self.worker_fields['status']))
