def setUp(self): super(TestImmutableTaskStub, self).setUp() task_factory = glance.domain.TaskFactory() self.context = glance.context.RequestContext(tenant=TENANT2) task_type = 'import' owner = TENANT2 task = task_factory.new_task(task_type, owner) self.task = authorization.ImmutableTaskStubProxy(task)
def setUp(self): super(TestImmutableTaskStub, self).setUp() task_factory = glance.domain.TaskFactory() self.context = glance.context.RequestContext(tenant=TENANT2) task_type = 'import' image_id = 'fake_image_id' user_id = 'fake_user' request_id = 'fake_request_id' owner = TENANT2 task = task_factory.new_task(task_type, owner, image_id, user_id, request_id) self.task = authorization.ImmutableTaskStubProxy(task)