Commit 9a8e264f authored by Łukasz Nowak's avatar Łukasz Nowak

Simplify test.

Expanding does not depend on movement state.
parent 9e68546a
......@@ -28,11 +28,6 @@ class TestDefaultInvoicingRule(testSlapOSMixin):
.getSimulationState
try:
def getSimulationStatePlanned(self, *args, **kwargs):
if self.getId() == 'root_simulation_movement':
return 'planned'
def getSimulationStateDeliveredPLanned(self, *args, **kwargs):
if self.getId() == 'root_simulation_movement':
return 'delivered'
return 'planned'
SimulationMovement.getSimulationState = getSimulationStatePlanned
......@@ -79,18 +74,6 @@ class TestDefaultInvoicingRule(testSlapOSMixin):
root_simulation_movement.getSimulationState())
root_simulation_movement.expand(expand_policy='immediate')
applied_rule_list = root_simulation_movement.contentValues(
portal_type='Applied Rule')
# if movement is not in final state, expand is no-op
self.assertEqual(0, len(applied_rule_list))
SimulationMovement.getSimulationState = \
getSimulationStateDeliveredPLanned
self.assertEqual('delivered',
root_simulation_movement.getSimulationState())
root_simulation_movement.expand(expand_policy='immediate')
applied_rule_list = root_simulation_movement.contentValues(
portal_type='Applied Rule')
......
60
\ No newline at end of file
61
\ No newline at end of file
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