[Erp5-report] r20082 - /erp5/trunk/products/ERP5/tests/testAccounting.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Mar 20 19:43:56 CET 2008


Author: jerome
Date: Thu Mar 20 19:43:56 2008
New Revision: 20082

URL: http://svn.erp5.org?rev=20082&view=rev
Log:
support --save and --load in accounting testcase

Modified:
    erp5/trunk/products/ERP5/tests/testAccounting.py

Modified: erp5/trunk/products/ERP5/tests/testAccounting.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testAccounting.py?rev=20082&r1=20081&r2=20082&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testAccounting.py (original)
+++ erp5/trunk/products/ERP5/tests/testAccounting.py Thu Mar 20 19:43:56 2008
@@ -31,6 +31,7 @@
 """
 
 import unittest
+import os
 
 from DateTime import DateTime
 from Products.CMFCore.utils import _checkPermission
@@ -159,6 +160,8 @@
     """Setup the fixture.
     """
     ERP5TypeTestCase.setUp(self)
+    if os.environ.get('erp5_save_data_fs'):
+      return
     self.portal = self.getPortal()
     self.account_module = self.portal.account_module
     self.accounting_module = self.portal.accounting_module
@@ -189,6 +192,8 @@
   def tearDown(self):
     """Remove all documents, except the default ones.
     """
+    if os.environ.get('erp5_save_data_fs'):
+      return
     get_transaction().abort()
     self.accounting_module.manage_delObjects(
                       list(self.accounting_module.objectIds()))




More information about the Erp5-report mailing list