[Erp5-report] r45256 leonardo - /erp5/trunk/products/ERP5/tests/testBPMCore.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Apr 8 15:20:41 CEST 2011
Author: leonardo
Date: Fri Apr 8 15:20:41 2011
New Revision: 45256
URL: http://svn.erp5.org?rev=45256&view=rev
Log:
add ids to Trade Model Paths and Business Links created by TestBPMMixin and subclasses
Modified:
erp5/trunk/products/ERP5/tests/testBPMCore.py
Modified: erp5/trunk/products/ERP5/tests/testBPMCore.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testBPMCore.py?rev=45256&r1=45255&r2=45256&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testBPMCore.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testBPMCore.py [utf8] Fri Apr 8 15:20:41 2011
@@ -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:
More information about the Erp5-report
mailing list