[Erp5-report] r43111 arnaud.fontaine - /erp5/trunk/products/ERP5/tests/testTask.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Feb 7 07:45:21 CET 2011
Author: arnaud.fontaine
Date: Mon Feb 7 07:45:20 2011
New Revision: 43111
URL: http://svn.erp5.org?rev=43111&view=rev
Log:
Ensure that accessors are re-generated after modifying the Property
Sheets of a Portal Type
Modified:
erp5/trunk/products/ERP5/tests/testTask.py
Modified: erp5/trunk/products/ERP5/tests/testTask.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testTask.py?rev=43111&r1=43110&r2=43111&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testTask.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testTask.py [utf8] Mon Feb 7 07:45:20 2011
@@ -28,6 +28,7 @@
##############################################################################
import unittest
+import transaction
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from AccessControl.SecurityManagement import newSecurityManager
@@ -722,6 +723,7 @@ class TestTask(TestTaskMixin, ERP5TypeTe
if not('TaskConstraint' in original_property_sheet_list):
new_property_sheet_list = ['TaskConstraint'] + original_property_sheet_list
portal_type.edit(type_property_sheet_list=new_property_sheet_list)
+ transaction.commit()
task_module = portal.getDefaultModule(portal_type=self.task_portal_type)
task = task_module.newContent(portal_type=self.task_portal_type)
doActionFor = self.portal.portal_workflow.doActionFor
@@ -752,7 +754,6 @@ class TestTask(TestTaskMixin, ERP5TypeTe
finally:
portal_type.setTypePropertySheetList(original_property_sheet_list)
-
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestTask))
More information about the Erp5-report
mailing list