Commit f7ed7906 authored by Jérome Perrin's avatar Jérome Perrin

support --save and --load in accounting testcase


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20082 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c94e2775
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
""" """
import unittest import unittest
import os
from DateTime import DateTime from DateTime import DateTime
from Products.CMFCore.utils import _checkPermission from Products.CMFCore.utils import _checkPermission
...@@ -159,6 +160,8 @@ class AccountingTestCase(ERP5TypeTestCase): ...@@ -159,6 +160,8 @@ class AccountingTestCase(ERP5TypeTestCase):
"""Setup the fixture. """Setup the fixture.
""" """
ERP5TypeTestCase.setUp(self) ERP5TypeTestCase.setUp(self)
if os.environ.get('erp5_save_data_fs'):
return
self.portal = self.getPortal() self.portal = self.getPortal()
self.account_module = self.portal.account_module self.account_module = self.portal.account_module
self.accounting_module = self.portal.accounting_module self.accounting_module = self.portal.accounting_module
...@@ -189,6 +192,8 @@ class AccountingTestCase(ERP5TypeTestCase): ...@@ -189,6 +192,8 @@ class AccountingTestCase(ERP5TypeTestCase):
def tearDown(self): def tearDown(self):
"""Remove all documents, except the default ones. """Remove all documents, except the default ones.
""" """
if os.environ.get('erp5_save_data_fs'):
return
get_transaction().abort() get_transaction().abort()
self.accounting_module.manage_delObjects( self.accounting_module.manage_delObjects(
list(self.accounting_module.objectIds())) list(self.accounting_module.objectIds()))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment