[Erp5-report] r42998 arnaud.fontaine - /erp5/trunk/products/ERP5/tests/testBase.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Feb 3 17:36:58 CET 2011
Author: arnaud.fontaine
Date: Thu Feb 3 17:36:58 2011
New Revision: 42998
URL: http://svn.erp5.org?rev=42998&view=rev
Log:
Ensure that accessors are re-generated by performing a commit after
each change on workflows rather than calling _aq_reset.
Modified:
erp5/trunk/products/ERP5/tests/testBase.py
Modified: erp5/trunk/products/ERP5/tests/testBase.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testBase.py?rev=42998&r1=42997&r2=42998&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testBase.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testBase.py [utf8] Thu Feb 3 17:36:58 2011
@@ -41,7 +41,6 @@ from Products.ERP5Type.tests.Sequence im
from Products.ERP5Type.Base import Base
from zExceptions import BadRequest
from Products.ERP5Type.tests.backportUnittest import skip
-from Products.ERP5Type.Tool.ClassTool import _aq_reset
from Products.ERP5Type.Workflow import addWorkflowByType
from Products.CMFCore.WorkflowCore import WorkflowException
@@ -136,7 +135,8 @@ class TestBase(ERP5TypeTestCase, ZopeTes
"""
self.getWorkflowTool().setChainForPortalTypes(
['Organisation'], ())
- _aq_reset()
+
+ transaction.commit()
def stepAssociateWorkflows(self, sequence=None, sequence_list=None, **kw):
"""
@@ -144,7 +144,8 @@ class TestBase(ERP5TypeTestCase, ZopeTes
"""
self.getWorkflowTool().setChainForPortalTypes(
['Organisation'], ('validation_workflow', 'edit_workflow'))
- _aq_reset()
+
+ transaction.commit()
def stepAssociateWorkflowsExcludingEdit(self, sequence=None,
sequence_list=None, **kw):
@@ -153,7 +154,8 @@ class TestBase(ERP5TypeTestCase, ZopeTes
"""
self.getWorkflowTool().setChainForPortalTypes(
['Organisation'], ('validation_workflow',))
- _aq_reset()
+
+ transaction.commit()
def stepCreateObject(self, sequence=None, sequence_list=None, **kw):
"""
@@ -950,6 +952,9 @@ class TestBase(ERP5TypeTestCase, ZopeTes
pw = self.getWorkflowTool()
dummy_worlflow_id = 'never_existent_workflow'
addWorkflowByType(pw, 'erp5_workflow', dummy_worlflow_id)
+
+ transaction.commit()
+
cbt = pw._chains_by_type
props = {}
for id, wf_ids in cbt.iteritems():
@@ -959,8 +964,7 @@ class TestBase(ERP5TypeTestCase, ZopeTes
pw.manage_changeWorkflows('', props = props)
pw.manage_delObjects([dummy_worlflow_id])
- # Make sure that _aq_dynamic will be called again.
- _aq_reset()
+ transaction.commit()
try:
self.assertRaises(AttributeError, getattr, obj,
@@ -977,6 +981,8 @@ class TestBase(ERP5TypeTestCase, ZopeTes
props['chain_%s' % id] = ','.join(wf_ids)
pw.manage_changeWorkflows('', props = props)
+ transaction.commit()
+
def test_14_UpdateRoleMappingwithNoDefinedRoleAndAcquisitionActivatedOnWorkflow(self, quiet=quiet, run=run_all_test):
"""updateRoleMappingsFor does a logical AND between all workflow defining security,
if a workflow defines no permission and is set to acquire permissions,
More information about the Erp5-report
mailing list