[Erp5-report] r17042 - /erp5/trunk/products/ERP5Type/tests/testERP5Type.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Oct 18 18:36:08 CEST 2007


Author: jerome
Date: Thu Oct 18 18:36:08 2007
New Revision: 17042

URL: http://svn.erp5.org?rev=17042&view=rev
Log:
In teardown, first abort the transaction to abort whatever changes have been
made, then remove objects that might have been created if a transaction has
been commited explicitly, and commit + tic to make this removal permanent.
( ZopeTestCase will abort in tearDown )


Modified:
    erp5/trunk/products/ERP5Type/tests/testERP5Type.py

Modified: erp5/trunk/products/ERP5Type/tests/testERP5Type.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/testERP5Type.py?rev=17042&r1=17041&r2=17042&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/testERP5Type.py (original)
+++ erp5/trunk/products/ERP5Type/tests/testERP5Type.py Thu Oct 18 18:36:08 2007
@@ -137,11 +137,13 @@
       self.getTypesTool().getTypeInfo('Person').filter_content_types = 0
 
     def beforeTearDown(self):
+      get_transaction().abort()
       for module in [ self.getPersonModule(),
                       self.getOrganisationModule(),
                       self.getCategoryTool().region ]:
         module.manage_delObjects(list(module.objectIds()))
       get_transaction().commit()
+      self.tic()
 
     def loginWithNoRole(self, quiet=0, run=run_all_test):
       uf = self.getPortal().acl_users




More information about the Erp5-report mailing list