Commit 3146edb0 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

move 'clean up' part to beforeTearDown() that supports Purchase Supply too.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29843 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1c5104e9
......@@ -34,11 +34,6 @@ from Products.ERP5Type.tests.utils import reindex
from DateTime import DateTime
class TestSupplyMixin:
supply_portal_type = 'Sale Supply'
supply_line_portal_type = 'Sale Supply Line'
supply_cell_portal_type = 'Sale Supply Cell'
def getBusinessTemplateList(self):
"""
List of needed Business Templates
......@@ -57,12 +52,21 @@ class TestSupplyMixin:
id='testing_folder')
self.folder = self.portal.testing_folder
def beforeTearDown(self):
module = self.portal.getDefaultModule(self.supply_portal_type)
module.manage_delObjects(list(module.objectIds()))
self.stepTic()
class TestSaleSupply(TestSupplyMixin, ERP5TypeTestCase):
"""
Test Supplies usage
"""
run_all_test = 1
supply_portal_type = 'Sale Supply'
supply_line_portal_type = 'Sale Supply Line'
supply_cell_portal_type = 'Sale Supply Cell'
def getTitle(self):
return "Sale Supply"
......@@ -188,10 +192,6 @@ class TestSaleSupply(TestSupplyMixin, ERP5TypeTestCase):
portal = self.portal
original_date = DateTime().earliestTime()
# clean up
portal.sale_supply_module.manage_delObjects(list(portal.sale_supply_module.objectIds()))
self.stepTic()
supply = self._makeSupply(start_date_range_min=original_date)
supply_line = self._makeSupplyLine(supply)
self.stepTic()
......
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