def reset_task_status(self): self.mock.StubOutWithMock(MgmtInstance, "load") MgmtInstance.load(context=self.context, id=self.db_info.id).AndReturn(self.instance) self.mock.ReplayAll() req, body = self._make_request(context=self.context) self.controller = MgmtInstanceController() resp = self.controller.action(req, body, self.tenant_id, self.db_info.id) self.mock.UnsetStubs() self.mock.VerifyAll() return resp
def reset_task_status(self): self.mock.StubOutWithMock(MgmtInstance, 'load') MgmtInstance.load(context=self.context, id=self.db_info.id).AndReturn(self.instance) self.mock.ReplayAll() req, body = self._make_request(context=self.context) self.controller = MgmtInstanceController() resp = self.controller.action(req, body, self.tenant_id, self.db_info.id) self.mock.UnsetStubs() self.mock.VerifyAll() return resp