Commit 7fd0f630 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

port testBPMCore to the new simulation hierarchy.

* use different state than 'planned' as frozen state, to avoid unexpected isFrozen() value.
* use order business path.
* fix wrong assertions based on the wrong behaviour caused by the legacy simulation hierarchy.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34658 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ae1d3c66
...@@ -626,8 +626,8 @@ class TestBPMDummyDeliveryMovementMixin(TestBPMMixin): ...@@ -626,8 +626,8 @@ class TestBPMDummyDeliveryMovementMixin(TestBPMMixin):
self.portal.deleteContent(id='testing_folder') self.portal.deleteContent(id='testing_folder')
self.stepTic() self.stepTic()
completed_state = 'confirmed' completed_state = 'delivered'
frozen_state = 'planned' frozen_state = 'confirmed'
completed_state_list = [completed_state, frozen_state] completed_state_list = [completed_state, frozen_state]
frozen_state_list = [frozen_state] frozen_state_list = [frozen_state]
...@@ -641,6 +641,12 @@ class TestBPMDummyDeliveryMovementMixin(TestBPMMixin): ...@@ -641,6 +641,12 @@ class TestBPMDummyDeliveryMovementMixin(TestBPMMixin):
# path which is completed, as soon as related simulation movements are in # path which is completed, as soon as related simulation movements are in
# proper state # proper state
self.order_path = self.createBusinessPath(business_process,
successor_value = ordered,
trade_phase='default/order',
completed_state_list = self.completed_state_list,
frozen_state_list = self.frozen_state_list)
self.delivery_path = self.createBusinessPath(business_process, self.delivery_path = self.createBusinessPath(business_process,
predecessor_value = ordered, successor_value = delivered, predecessor_value = ordered, successor_value = delivered,
trade_phase='default/delivery', trade_phase='default/delivery',
...@@ -658,6 +664,12 @@ class TestBPMDummyDeliveryMovementMixin(TestBPMMixin): ...@@ -658,6 +664,12 @@ class TestBPMDummyDeliveryMovementMixin(TestBPMMixin):
delivered = self.createBusinessState(business_process) delivered = self.createBusinessState(business_process)
invoiced = self.createBusinessState(business_process) invoiced = self.createBusinessState(business_process)
self.order_path = self.createBusinessPath(business_process,
successor_value = ordered,
trade_phase='default/order',
completed_state_list = self.completed_state_list,
frozen_state_list = self.frozen_state_list)
self.invoice_path = self.createBusinessPath(business_process, self.invoice_path = self.createBusinessPath(business_process,
predecessor_value = ordered, successor_value = invoiced, predecessor_value = ordered, successor_value = invoiced,
trade_phase='default/invoicing', trade_phase='default/invoicing',
...@@ -689,12 +701,19 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -689,12 +701,19 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin):
simulation_movement = applied_rule.newContent( simulation_movement = applied_rule.newContent(
portal_type = 'Simulation Movement', portal_type = 'Simulation Movement',
order_value = order_line, delivery_value = order_line,
causality_value = self.delivery_path causality_value = self.order_path
) )
# second level rule with simulation movement # second level rule with simulation movement
invoicing_rule = simulation_movement.newContent( delivery_rule = simulation_movement.newContent(
portal_type='Applied Rule')
delivery_simulation_movement = delivery_rule.newContent(
portal_type='Simulation Movement',
causality_value = self.delivery_path)
# third level rule with simulation movement
invoicing_rule = delivery_simulation_movement.newContent(
portal_type='Applied Rule') portal_type='Applied Rule')
invoicing_simulation_movement = invoicing_rule.newContent( invoicing_simulation_movement = invoicing_rule.newContent(
portal_type='Simulation Movement', portal_type='Simulation Movement',
...@@ -702,22 +721,30 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -702,22 +721,30 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin):
# split simulation movement for first level applied rule # split simulation movement for first level applied rule
split_simulation_movement = applied_rule.newContent( split_simulation_movement = applied_rule.newContent(
portal_type = 'Simulation Movement', order_value = order_line, portal_type = 'Simulation Movement', delivery_value = order_line,
causality_value = self.delivery_path) causality_value = self.order_path)
# second level rule with simulation movement for split parent movement # second level rule with simulation movement for split parent movement
split_invoicing_rule = split_simulation_movement.newContent( split_delivery_rule = split_simulation_movement.newContent(
portal_type='Applied Rule')
split_delivery_simulation_movement = split_delivery_rule.newContent(
portal_type='Simulation Movement',
causality_value = self.delivery_path)
# third level rule with simulation movement for split parent movement
split_invoicing_rule = split_delivery_simulation_movement.newContent(
portal_type='Applied Rule') portal_type='Applied Rule')
split_invoicing_simulation_movement = split_invoicing_rule.newContent( split_invoicing_simulation_movement = split_invoicing_rule.newContent(
portal_type='Simulation Movement', portal_type='Simulation Movement',
causality_value = self.invoice_path) causality_value = self.invoice_path)
order.setSimulationState(self.completed_state)
self.stepTic() self.stepTic()
# in the beginning only order related movements shall be buildable # in the beginning only order related movements shall be buildable
self.assertEquals(self.delivery_path.isBuildable(order), True) self.assertEquals(self.delivery_path.isBuildable(order), True)
self.assertEquals(simulation_movement.isBuildable(), True) self.assertEquals(delivery_simulation_movement.isBuildable(), True)
self.assertEquals(split_simulation_movement.isBuildable(), True) self.assertEquals(split_delivery_simulation_movement.isBuildable(), True)
self.assertEquals(self.invoice_path.isBuildable(order), False) self.assertEquals(self.invoice_path.isBuildable(order), False)
self.assertEquals(invoicing_simulation_movement.isBuildable(), False) self.assertEquals(invoicing_simulation_movement.isBuildable(), False)
...@@ -729,7 +756,7 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -729,7 +756,7 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin):
delivery_line = self._createMovement(delivery) delivery_line = self._createMovement(delivery)
# relate not split movement with delivery (deliver it) # relate not split movement with delivery (deliver it)
simulation_movement.edit(delivery_value = delivery_line) delivery_simulation_movement.edit(delivery_value = delivery_line)
self.stepTic() self.stepTic()
...@@ -742,11 +769,11 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -742,11 +769,11 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin):
# delivery_path (for delivery) is not buildable - delivery is already # delivery_path (for delivery) is not buildable - delivery is already
# built for those movements # built for those movements
self.assertEquals(self.delivery_path.isBuildable(order), True) self.assertEquals(self.delivery_path.isBuildable(order), True)
self.assertEquals(split_simulation_movement.isBuildable(), True) self.assertEquals(split_delivery_simulation_movement.isBuildable(), True)
self.assertEquals(self.delivery_path.isBuildable(delivery), False) self.assertEquals(self.delivery_path.isBuildable(delivery), False)
self.assertEquals(self.invoice_path.isBuildable(delivery), False) self.assertEquals(self.invoice_path.isBuildable(delivery), False)
self.assertEquals(simulation_movement.isBuildable(), False) self.assertEquals(delivery_simulation_movement.isBuildable(), False)
self.assertEquals(invoicing_simulation_movement.isBuildable(), False) self.assertEquals(invoicing_simulation_movement.isBuildable(), False)
self.assertEquals(self.invoice_path.isBuildable(order), False) self.assertEquals(self.invoice_path.isBuildable(order), False)
self.assertEquals(split_invoicing_simulation_movement.isBuildable(), self.assertEquals(split_invoicing_simulation_movement.isBuildable(),
...@@ -777,7 +804,7 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -777,7 +804,7 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin):
self.assertEquals(self.invoice_path.isBuildable(order), True) self.assertEquals(self.invoice_path.isBuildable(order), True)
self.assertEquals(self.delivery_path.isBuildable(delivery), False) self.assertEquals(self.delivery_path.isBuildable(delivery), False)
self.assertEquals(simulation_movement.isBuildable(), False) self.assertEquals(delivery_simulation_movement.isBuildable(), False)
self.assertEquals(split_invoicing_simulation_movement.isBuildable(), self.assertEquals(split_invoicing_simulation_movement.isBuildable(),
False) False)
...@@ -799,20 +826,27 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -799,20 +826,27 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin):
simulation_movement = applied_rule.newContent( simulation_movement = applied_rule.newContent(
portal_type = 'Simulation Movement', portal_type = 'Simulation Movement',
order_value = order_line, delivery_value = order_line,
causality_value = self.delivery_path causality_value = self.order_path
) )
invoicing_rule = simulation_movement.newContent( delivery_rule = simulation_movement.newContent(
portal_type='Applied Rule')
delivery_simulation_movement = delivery_rule.newContent(
portal_type='Simulation Movement',
causality_value = self.delivery_path)
invoicing_rule = delivery_simulation_movement.newContent(
portal_type='Applied Rule') portal_type='Applied Rule')
invoicing_simulation_movement = invoicing_rule.newContent( invoicing_simulation_movement = invoicing_rule.newContent(
portal_type='Simulation Movement', portal_type='Simulation Movement',
causality_value = self.invoice_path) causality_value = self.invoice_path)
order.setSimulationState(self.completed_state)
self.stepTic() self.stepTic()
self.assertEquals(self.delivery_path.isBuildable(order), False) self.assertEquals(self.delivery_path.isBuildable(order), False)
self.assertEquals(simulation_movement.isBuildable(), False) self.assertEquals(delivery_simulation_movement.isBuildable(), False)
self.assertEquals(self.invoice_path.isBuildable(order), True) self.assertEquals(self.invoice_path.isBuildable(order), True)
self.assertEquals(invoicing_simulation_movement.isBuildable(), True) self.assertEquals(invoicing_simulation_movement.isBuildable(), True)
...@@ -828,7 +862,7 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -828,7 +862,7 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin):
self.assertEquals(self.delivery_path.isBuildable(delivery), False) self.assertEquals(self.delivery_path.isBuildable(delivery), False)
self.assertEquals(self.invoice_path.isBuildable(delivery), False) self.assertEquals(self.invoice_path.isBuildable(delivery), False)
self.assertEquals(simulation_movement.isBuildable(), False) self.assertEquals(delivery_simulation_movement.isBuildable(), False)
self.assertEquals(invoicing_simulation_movement.isBuildable(), False) self.assertEquals(invoicing_simulation_movement.isBuildable(), False)
self.assertEquals(self.invoice_path.isBuildable(order), False) self.assertEquals(self.invoice_path.isBuildable(order), False)
...@@ -846,13 +880,13 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -846,13 +880,13 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin):
self.assertEquals(invoicing_simulation_movement.isBuildable(), False) self.assertEquals(invoicing_simulation_movement.isBuildable(), False)
self.assertEquals(self.invoice_path.isBuildable(delivery), False) self.assertEquals(self.invoice_path.isBuildable(delivery), False)
self.assertEquals(self.invoice_path.isBuildable(order), False) self.assertEquals(self.invoice_path.isBuildable(order), False)
self.assertEquals(simulation_movement.isBuildable(), True) self.assertEquals(delivery_simulation_movement.isBuildable(), True)
# now simulate compensation # now simulate compensation
compensated_simulation_movement = applied_rule.newContent( compensated_simulation_movement = delivery_rule.newContent(
portal_type = 'Simulation Movement', portal_type = 'Simulation Movement',
order_value = order_line, delivery_value = order_line,
causality_value = self.delivery_path causality_value = self.delivery_path
) )
...@@ -868,16 +902,13 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -868,16 +902,13 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin):
another_delivery = self._createDelivery(causality_value = delivery) another_delivery = self._createDelivery(causality_value = delivery)
another_delivery_line = self._createMovement(another_delivery) another_delivery_line = self._createMovement(another_delivery)
simulation_movement.edit(delivery_value=another_delivery_line) delivery_simulation_movement.edit(delivery_value=another_delivery_line)
self.stepTic() self.stepTic()
# XXX look at comments in BusinessPath.isBuildable self.assertEquals(self.delivery_path.isBuildable(order), False)
# in this case expected result if False for delivery_path.isBuildable(order)
self.assertEquals(self.delivery_path.isBuildable(order), True)
self.assertEquals(self.delivery_path.isBuildable(delivery), False)
self.assertEquals(simulation_movement.isBuildable(), False) self.assertEquals(delivery_simulation_movement.isBuildable(), False)
self.assertEquals(invoicing_simulation_movement.isBuildable(), False) self.assertEquals(invoicing_simulation_movement.isBuildable(), False)
self.assertEquals(self.invoice_path.isBuildable(order), True) self.assertEquals(self.invoice_path.isBuildable(order), True)
...@@ -901,12 +932,19 @@ class TestBPMisCompletedImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -901,12 +932,19 @@ class TestBPMisCompletedImplementation(TestBPMDummyDeliveryMovementMixin):
simulation_movement = applied_rule.newContent( simulation_movement = applied_rule.newContent(
portal_type = 'Simulation Movement', portal_type = 'Simulation Movement',
order_value = order_line, delivery_value = order_line,
causality_value = self.delivery_path causality_value = self.order_path
) )
# second level rule with simulation movement # second level rule with simulation movement
invoicing_rule = simulation_movement.newContent( delivery_rule = simulation_movement.newContent(
portal_type='Applied Rule')
delivery_simulation_movement = delivery_rule.newContent(
portal_type='Simulation Movement',
causality_value = self.delivery_path)
# third level rule with simulation movement
invoicing_rule = delivery_simulation_movement.newContent(
portal_type='Applied Rule') portal_type='Applied Rule')
invoicing_simulation_movement = invoicing_rule.newContent( invoicing_simulation_movement = invoicing_rule.newContent(
portal_type='Simulation Movement', portal_type='Simulation Movement',
...@@ -914,11 +952,18 @@ class TestBPMisCompletedImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -914,11 +952,18 @@ class TestBPMisCompletedImplementation(TestBPMDummyDeliveryMovementMixin):
# split simulation movement for first level applied rule # split simulation movement for first level applied rule
split_simulation_movement = applied_rule.newContent( split_simulation_movement = applied_rule.newContent(
portal_type = 'Simulation Movement', order_value = order_line, portal_type = 'Simulation Movement', delivery_value = order_line,
causality_value = self.delivery_path) causality_value = self.order_path)
# second level rule with simulation movement for split parent movement # second level rule with simulation movement for split parent movement
split_invoicing_rule = split_simulation_movement.newContent( split_delivery_rule = split_simulation_movement.newContent(
portal_type='Applied Rule')
split_delivery_simulation_movement = split_delivery_rule.newContent(
portal_type='Simulation Movement',
causality_value = self.delivery_path)
# third level rule with simulation movement for split parent movement
split_invoicing_rule = split_delivery_simulation_movement.newContent(
portal_type='Applied Rule') portal_type='Applied Rule')
split_invoicing_simulation_movement = split_invoicing_rule.newContent( split_invoicing_simulation_movement = split_invoicing_rule.newContent(
portal_type='Simulation Movement', portal_type='Simulation Movement',
...@@ -937,7 +982,7 @@ class TestBPMisCompletedImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -937,7 +982,7 @@ class TestBPMisCompletedImplementation(TestBPMDummyDeliveryMovementMixin):
delivery_line = self._createMovement(delivery) delivery_line = self._createMovement(delivery)
# relate not split movement with delivery (deliver it) # relate not split movement with delivery (deliver it)
simulation_movement.edit(delivery_value = delivery_line) delivery_simulation_movement.edit(delivery_value = delivery_line)
self.stepTic() self.stepTic()
...@@ -988,11 +1033,17 @@ class TestBPMisCompletedImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -988,11 +1033,17 @@ class TestBPMisCompletedImplementation(TestBPMDummyDeliveryMovementMixin):
simulation_movement = applied_rule.newContent( simulation_movement = applied_rule.newContent(
portal_type = 'Simulation Movement', portal_type = 'Simulation Movement',
order_value = order_line, delivery_value = order_line,
causality_value = self.delivery_path causality_value = self.delivery_path
) )
invoicing_rule = simulation_movement.newContent( delivery_rule = simulation_movement.newContent(
portal_type='Applied Rule')
delivery_simulation_movement = delivery_rule.newContent(
portal_type='Simulation Movement',
causality_value = self.delivery_path)
invoicing_rule = delivery_simulation_movement.newContent(
portal_type='Applied Rule') portal_type='Applied Rule')
invoicing_simulation_movement = invoicing_rule.newContent( invoicing_simulation_movement = invoicing_rule.newContent(
portal_type='Simulation Movement', portal_type='Simulation Movement',
...@@ -1048,9 +1099,9 @@ class TestBPMisCompletedImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -1048,9 +1099,9 @@ class TestBPMisCompletedImplementation(TestBPMDummyDeliveryMovementMixin):
# now simulate compensation # now simulate compensation
compensated_simulation_movement = applied_rule.newContent( compensated_simulation_movement = delivery_rule.newContent(
portal_type = 'Simulation Movement', portal_type = 'Simulation Movement',
order_value = order_line, delivery_value = order_line,
causality_value = self.delivery_path causality_value = self.delivery_path
) )
...@@ -1066,7 +1117,7 @@ class TestBPMisCompletedImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -1066,7 +1117,7 @@ class TestBPMisCompletedImplementation(TestBPMDummyDeliveryMovementMixin):
another_delivery = self._createDelivery(causality_value = delivery) another_delivery = self._createDelivery(causality_value = delivery)
another_delivery_line = self._createMovement(another_delivery) another_delivery_line = self._createMovement(another_delivery)
simulation_movement.edit(delivery_value=another_delivery_line) delivery_simulation_movement.edit(delivery_value=another_delivery_line)
self.stepTic() self.stepTic()
...@@ -1097,12 +1148,19 @@ class TestBPMisFrozenImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -1097,12 +1148,19 @@ class TestBPMisFrozenImplementation(TestBPMDummyDeliveryMovementMixin):
simulation_movement = applied_rule.newContent( simulation_movement = applied_rule.newContent(
portal_type = 'Simulation Movement', portal_type = 'Simulation Movement',
order_value = order_line, delivery_value = order_line,
causality_value = self.delivery_path causality_value = self.delivery_path
) )
# second level rule with simulation movement # second level rule with simulation movement
invoicing_rule = simulation_movement.newContent( delivery_rule = simulation_movement.newContent(
portal_type='Applied Rule')
delivery_simulation_movement = delivery_rule.newContent(
portal_type='Simulation Movement',
causality_value = self.delivery_path)
# third level rule with simulation movement
invoicing_rule = delivery_simulation_movement.newContent(
portal_type='Applied Rule') portal_type='Applied Rule')
invoicing_simulation_movement = invoicing_rule.newContent( invoicing_simulation_movement = invoicing_rule.newContent(
portal_type='Simulation Movement', portal_type='Simulation Movement',
...@@ -1110,11 +1168,18 @@ class TestBPMisFrozenImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -1110,11 +1168,18 @@ class TestBPMisFrozenImplementation(TestBPMDummyDeliveryMovementMixin):
# split simulation movement for first level applied rule # split simulation movement for first level applied rule
split_simulation_movement = applied_rule.newContent( split_simulation_movement = applied_rule.newContent(
portal_type = 'Simulation Movement', order_value = order_line, portal_type = 'Simulation Movement', delivery_value = order_line,
causality_value = self.delivery_path) causality_value = self.order_path)
# second level rule with simulation movement for split parent movement # second level rule with simulation movement for split parent movement
split_invoicing_rule = split_simulation_movement.newContent( split_delivery_rule = split_simulation_movement.newContent(
portal_type='Applied Rule')
split_delivery_simulation_movement = split_delivery_rule.newContent(
portal_type='Simulation Movement',
causality_value = self.delivery_path)
# third level rule with simulation movement for split parent movement
split_invoicing_rule = split_delivery_simulation_movement.newContent(
portal_type='Applied Rule') portal_type='Applied Rule')
split_invoicing_simulation_movement = split_invoicing_rule.newContent( split_invoicing_simulation_movement = split_invoicing_rule.newContent(
portal_type='Simulation Movement', portal_type='Simulation Movement',
...@@ -1135,7 +1200,7 @@ class TestBPMisFrozenImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -1135,7 +1200,7 @@ class TestBPMisFrozenImplementation(TestBPMDummyDeliveryMovementMixin):
delivery_line = self._createMovement(delivery) delivery_line = self._createMovement(delivery)
# relate not split movement with delivery (deliver it) # relate not split movement with delivery (deliver it)
simulation_movement.edit(delivery_value = delivery_line) delivery_simulation_movement.edit(delivery_value = delivery_line)
self.stepTic() self.stepTic()
...@@ -1163,10 +1228,10 @@ class TestBPMisFrozenImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -1163,10 +1228,10 @@ class TestBPMisFrozenImplementation(TestBPMDummyDeliveryMovementMixin):
self.assertEqual(self.delivery_path.isFrozen(order), False) self.assertEqual(self.delivery_path.isFrozen(order), False)
self.assertEqual(self.invoice_path.isFrozen(order), False) self.assertEqual(self.invoice_path.isFrozen(order), False)
self.assertEqual(self.delivery_path.isFrozen(delivery), True) self.assertEqual(self.delivery_path.isFrozen(delivery), False)
self.assertEqual(self.invoice_path.isFrozen(delivery), False) self.assertEqual(self.invoice_path.isFrozen(delivery), False)
self.assertEqual(simulation_movement.isFrozen(), True) self.assertEqual(delivery_simulation_movement.isFrozen(), True)
self.assertEqual(invoicing_simulation_movement.isFrozen(), False) self.assertEqual(invoicing_simulation_movement.isFrozen(), False)
self.assertEqual(split_simulation_movement.isFrozen(), False) self.assertEqual(split_simulation_movement.isFrozen(), False)
self.assertEqual(split_invoicing_simulation_movement.isFrozen(), False) self.assertEqual(split_invoicing_simulation_movement.isFrozen(), False)
...@@ -1183,11 +1248,17 @@ class TestBPMisFrozenImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -1183,11 +1248,17 @@ class TestBPMisFrozenImplementation(TestBPMDummyDeliveryMovementMixin):
simulation_movement = applied_rule.newContent( simulation_movement = applied_rule.newContent(
portal_type = 'Simulation Movement', portal_type = 'Simulation Movement',
order_value = order_line, delivery_value = order_line,
causality_value = self.delivery_path causality_value = self.delivery_path
) )
invoicing_rule = simulation_movement.newContent( delivery_rule = simulation_movement.newContent(
portal_type='Applied Rule')
delivery_simulation_movement = delivery_rule.newContent(
portal_type='Simulation Movement',
causality_value = self.delivery_path)
invoicing_rule = delivery_simulation_movement.newContent(
portal_type='Applied Rule') portal_type='Applied Rule')
invoicing_simulation_movement = invoicing_rule.newContent( invoicing_simulation_movement = invoicing_rule.newContent(
portal_type='Simulation Movement', portal_type='Simulation Movement',
...@@ -1235,9 +1306,9 @@ class TestBPMisFrozenImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -1235,9 +1306,9 @@ class TestBPMisFrozenImplementation(TestBPMDummyDeliveryMovementMixin):
# now simulate compensation # now simulate compensation
compensated_simulation_movement = applied_rule.newContent( compensated_simulation_movement = delivery_rule.newContent(
portal_type = 'Simulation Movement', portal_type = 'Simulation Movement',
order_value = order_line, delivery_value = order_line,
causality_value = self.delivery_path causality_value = self.delivery_path
) )
...@@ -1253,7 +1324,7 @@ class TestBPMisFrozenImplementation(TestBPMDummyDeliveryMovementMixin): ...@@ -1253,7 +1324,7 @@ class TestBPMisFrozenImplementation(TestBPMDummyDeliveryMovementMixin):
another_delivery = self._createDelivery(causality_value = delivery) another_delivery = self._createDelivery(causality_value = delivery)
another_delivery_line = self._createMovement(another_delivery) another_delivery_line = self._createMovement(another_delivery)
simulation_movement.edit(delivery_value=another_delivery_line) delivery_simulation_movement.edit(delivery_value=another_delivery_line)
self.stepTic() 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