From 2712522cbbc0c65b349c24b3501a9cdc49df1db1 Mon Sep 17 00:00:00 2001 From: Leonardo Rochael Almeida <leonardo@nexedi.com> Date: Fri, 8 Apr 2011 13:20:41 +0000 Subject: [PATCH] add ids to Trade Model Paths and Business Links created by TestBPMMixin and subclasses git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45256 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/tests/testBPMCore.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/product/ERP5/tests/testBPMCore.py b/product/ERP5/tests/testBPMCore.py index 5fc68e8bdb..acc3709184 100644 --- a/product/ERP5/tests/testBPMCore.py +++ b/product/ERP5/tests/testBPMCore.py @@ -155,6 +155,8 @@ class TestBPMMixin(ERP5TypeTestCase): def createBusinessLink(self, business_process=None, **kw): if business_process is None: business_process = self.createBusinessProcess() + if kw.get('reference'): + kw.setdefault('id', kw['reference']) business_link = business_process.newContent( portal_type=self.business_link_portal_type, **kw) return business_link @@ -163,6 +165,8 @@ class TestBPMMixin(ERP5TypeTestCase): criterion_property_dict={}, **kw): if business_process is None: business_process = self.createBusinessProcess() + if kw.get('reference') and not kw.get('id'): + kw.setdefault('id', kw['reference'] + '_path') trade_model_path = business_process.newContent( portal_type=self.trade_model_path_portal_type, **kw) if criterion_property_dict: -- 2.30.9