Commit da3880c2 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

rule should be identified by the reference not by the id.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31152 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9211b0dc
...@@ -761,12 +761,12 @@ class TestOrderMixin: ...@@ -761,12 +761,12 @@ class TestOrderMixin:
""" """
Test if simulation is matching order Test if simulation is matching order
""" """
self.checkOrderRuleSimulation(rule_id = 'default_order_rule', sequence=sequence, \ self.checkOrderRuleSimulation(rule_reference='default_order_rule', sequence=sequence, \
sequence_list=sequence_list, **kw) sequence_list=sequence_list, **kw)
def checkOrderRuleSimulation(self, rule_id, sequence=None, sequence_list=None, **kw): def checkOrderRuleSimulation(self, rule_reference, sequence=None, sequence_list=None, **kw):
""" """
Test if simulation is matching order, be sure that rule_id is used Test if simulation is matching order, be sure that rule_reference is used
to expand simulation for order to expand simulation for order
""" """
order = sequence.get('order') order = sequence.get('order')
...@@ -787,10 +787,10 @@ class TestOrderMixin: ...@@ -787,10 +787,10 @@ class TestOrderMixin:
self.failUnless(order_state, \ self.failUnless(order_state, \
applied_rule.getLastExpandSimulationState()) applied_rule.getLastExpandSimulationState())
# Test if applied rule has a specialise value with passed rule_id # Test if applied rule has a specialise value with passed rule_reference
portal_rules = getToolByName(order, 'portal_rules') portal_rules = getToolByName(order, 'portal_rules')
self.assertEquals(getattr(portal_rules,rule_id), \ self.assertEquals(rule_reference,
applied_rule.getSpecialiseValue()) applied_rule.getSpecialiseReference())
simulation_movement_list = applied_rule.objectValues() simulation_movement_list = applied_rule.objectValues()
sequence.edit(simulation_movement_list=simulation_movement_list) sequence.edit(simulation_movement_list=simulation_movement_list)
......
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