From fad9844d8f0b2e8cae9d8b8ba529f3349f5d3401 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Fri, 30 Apr 2010 08:29:59 +0000 Subject: [PATCH] change testBPMEvaluation in order to use trade state categories instead of business states git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@34874 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/tests/testBPMEvaluation.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/product/ERP5/tests/testBPMEvaluation.py b/product/ERP5/tests/testBPMEvaluation.py index 14bce48b1c..6404a62285 100644 --- a/product/ERP5/tests/testBPMEvaluation.py +++ b/product/ERP5/tests/testBPMEvaluation.py @@ -400,13 +400,12 @@ class TestBPMEvaluationMixin(TestBPMMixin): self.destination, self.destination_section = self._createNode() \ , self._createNode() - def _createBusinessStateList(self): + def _setTradeStateList(self): """Creates list of defaults states, set them on self as name_state property""" + tool = self.getCategoryTool() for state_name in ('ordered', 'delivered', 'invoiced', 'accounted', 'paid'): - state_document = self.createBusinessState(self.business_process, - title=state_name) - setattr(self,'%s_state' % state_name, state_document) + setattr(self,'%s_state' % state_name, tool.trade_state._getOb(state_name)) def _createRootDocument(self): self.root_document = self._createDocument(self.root_document_portal_type, @@ -504,7 +503,7 @@ class TestBPMEvaluationDefaultProcessMixin: def _createBusinessProcess(self): self.business_process = self.createBusinessProcess(title=self.id(), referential_date='start_date') - self._createBusinessStateList() + self._setTradeStateList() self.order_path = self.createBusinessPath(self.business_process, successor_value=self.ordered_state, @@ -552,7 +551,7 @@ class TestBPMEvaluationDifferentProcessMixin: def _createBusinessProcess(self): self.business_process = self.createBusinessProcess(title=self.id(), referential_date='start_date') - self._createBusinessStateList() + self._setTradeStateList() self.order_path = self.createBusinessPath(self.business_process, successor_value=self.ordered_state, -- 2.30.9