Commit fa897fae authored by Sebastien Robin's avatar Sebastien Robin

* deleting rules after test doesn't work if previous test

  totally failed, so this is better in aftersetup
* business_link_portal_type should be defined on the mixin

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45365 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a98b6298
......@@ -206,15 +206,17 @@ class TestBPMMixin(ERP5TypeTestCase):
def afterSetUp(self):
self.validateRules()
self.createCategories()
portal_rules = self.portal.portal_rules
if getattr(portal_rules,'test_invoice_transaction_simulation_rule', None)\
is not None:
portal_rules.manage_delObjects(
ids=['test_invoice_transaction_simulation_rule'])
self.createInvoiceTransactionRule()
self.stepTic()
def beforeTearDown(self):
# abort any transaction
transaction.abort()
# remove not needed rules
self.portal.portal_rules.manage_delObjects(
ids=['test_invoice_transaction_simulation_rule'])
self.stepTic()
class TestBPMImplementation(TestBPMMixin):
......
......@@ -51,7 +51,7 @@ TestTradeModelLineMixin.getAggregatedAmountList = getAggregatedAmountList
##
TestTradeModelLine.trade_model_path_portal_type = None
TestTradeModelLine.business_link_portal_type = None
TestTradeModelLineMixin.business_link_portal_type = None
for name in list(TestTradeModelLine.__dict__):
if '_NewSimulation_' in name:
......
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