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

testBPMCore: create more realistic simulation trees

Applied rules must have a rule as specialise
parent f5754f00
......@@ -291,7 +291,10 @@ class TestBPMDummyDeliveryMovementMixin(TestBPMMixin):
# first level rule with simulation movement
self.applied_rule = self.portal.portal_simulation.newContent(
portal_type='Applied Rule', causality_value=order)
portal_type='Applied Rule',
causality_value=order,
specialise_value=self.portal.portal_rules.new_order_root_simulation_rule,
)
def setTestClassProperty(prefix, property_name, document):
if prefix:
......@@ -316,7 +319,9 @@ class TestBPMDummyDeliveryMovementMixin(TestBPMMixin):
# second level rule with simulation movement
document = setTestClassProperty(prefix, 'delivery_rule',
document.newContent(
portal_type='Applied Rule'))
portal_type='Applied Rule',
specialise_value=self.portal.portal_rules.new_delivery_simulation_rule,
))
document = setTestClassProperty(prefix, 'delivery_simulation_movement',
document.newContent(
portal_type='Simulation Movement',
......@@ -329,7 +334,9 @@ class TestBPMDummyDeliveryMovementMixin(TestBPMMixin):
# third level rule with simulation movement
document = setTestClassProperty(prefix, 'invoicing_rule',
document.newContent(
portal_type='Applied Rule'))
portal_type='Applied Rule',
specialise_value=self.portal.portal_rules.new_invoice_simulation_rule,
))
document = setTestClassProperty(prefix,
'invoicing_simulation_movement',
document.newContent(
......
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