Commit ce2c2513 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

assert with reference not by id for applied rules.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32531 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 33ee4bec
......@@ -699,8 +699,8 @@ class TestProductionOrderMixin(TestOrderMixin):
# Test if applied rule has a specialise value with default_order_rule
portal_rules = getToolByName(order, 'portal_rules')
# XXX hardcoded value
self.assertEquals(portal_rules.default_production_order_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_production_order_rule', \
applied_rule.getSpecialiseReference())
simulation_movement_list = applied_rule.objectValues()
sequence.edit(simulation_movement_list=simulation_movement_list)
......@@ -754,8 +754,8 @@ class TestProductionOrderMixin(TestOrderMixin):
applied_rule = applied_rule_list[0]
self.assertEquals("Applied Rule", applied_rule.getPortalType())
portal_rules = getToolByName(applied_rule, 'portal_rules')
self.assertEquals(portal_rules.default_transformation_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_transformation_rule', \
applied_rule.getSpecialiseReference())
# Test deeper simulation
simulation_movement_list = applied_rule.objectValues()
self.assertEquals(2, len(simulation_movement_list))
......@@ -867,8 +867,8 @@ class TestProductionOrderMixin(TestOrderMixin):
applied_rule = applied_rule_list[0]
self.assertEquals("Applied Rule", applied_rule.getPortalType())
portal_rules = getToolByName(applied_rule, 'portal_rules')
self.assertEquals(portal_rules.default_transformation_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_transformation_rule', \
applied_rule.getSpecialiseReference())
# Test deeper simulation
simulation_movement_list = list(applied_rule.objectValues())
# FIXME
......@@ -926,8 +926,8 @@ class TestProductionOrderMixin(TestOrderMixin):
applied_rule = component_movement.objectValues()[0]
self.assertEquals("Applied Rule", applied_rule.getPortalType())
portal_rules = getToolByName(applied_rule, 'portal_rules')
self.assertEquals(portal_rules.default_transformation_sourcing_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_transformation_sourcing_rule', \
applied_rule.getSpecialiseReference())
# Test supply movement
simulation_movement_list = applied_rule.objectValues()
# FIXME
......@@ -1068,8 +1068,8 @@ class TestProductionOrderMixin(TestOrderMixin):
applied_rule = applied_rule_list[0]
self.assertEquals("Applied Rule", applied_rule.getPortalType())
portal_rules = getToolByName(applied_rule, 'portal_rules')
self.assertEquals(portal_rules.default_transformation_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_transformation_rule', \
applied_rule.getSpecialiseReference())
# Test deeper simulation
simulation_movement_list = list(applied_rule.objectValues())
# FIXME
......@@ -1130,8 +1130,8 @@ class TestProductionOrderMixin(TestOrderMixin):
applied_rule = component_movement.objectValues()[0]
self.assertEquals("Applied Rule", applied_rule.getPortalType())
portal_rules = getToolByName(applied_rule, 'portal_rules')
self.assertEquals(portal_rules.default_transformation_sourcing_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_transformation_sourcing_rule', \
applied_rule.getSpecialiseReference())
# Test supply movement
simulation_movement_list = applied_rule.objectValues()
# FIXME
......@@ -1168,8 +1168,8 @@ class TestProductionOrderMixin(TestOrderMixin):
applied_rule = applied_rule_list[0]
self.assertEquals("Applied Rule", applied_rule.getPortalType())
portal_rules = getToolByName(applied_rule, 'portal_rules')
self.assertEquals(portal_rules.default_transformation_sourcing_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_transformation_sourcing_rule', \
applied_rule.getSpecialiseReference())
# Test deeper simulation
simulation_movement_list = list(applied_rule.objectValues())
self.assertEquals(1, len(simulation_movement_list))
......@@ -1195,8 +1195,8 @@ class TestProductionOrderMixin(TestOrderMixin):
applied_rule = applied_rule_list[0]
self.assertEquals("Applied Rule", applied_rule.getPortalType())
portal_rules = getToolByName(applied_rule, 'portal_rules')
self.assertEquals(portal_rules.default_transformation_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_transformation_rule', \
applied_rule.getSpecialiseReference())
# Test deeper simulation
simulation_movement_list = list(applied_rule.objectValues())
# FIXME
......@@ -1255,8 +1255,8 @@ class TestProductionOrderMixin(TestOrderMixin):
applied_rule = component_movement.objectValues()[0]
self.assertEquals("Applied Rule", applied_rule.getPortalType())
portal_rules = getToolByName(applied_rule, 'portal_rules')
self.assertEquals(portal_rules.default_transformation_sourcing_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_transformation_sourcing_rule', \
applied_rule.getSpecialiseReference())
# Test supply movement
simulation_movement_list = applied_rule.objectValues()
# FIXME
......
......@@ -321,8 +321,8 @@ class TestProductionOrderApparelMixin(TestOrderMixin):
# Test if applied rule has a specialise value with default_order_rule
portal_rules = getToolByName(order, 'portal_rules')
# XXX hardcoded value
self.assertEquals(portal_rules.default_production_order_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_production_order_rule', \
applied_rule.getSpecialiseReference())
simulation_movement_list = applied_rule.objectValues()
sequence.edit(simulation_movement_list=simulation_movement_list)
......@@ -376,8 +376,8 @@ class TestProductionOrderApparelMixin(TestOrderMixin):
applied_rule = applied_rule_list[0]
self.assertEquals("Applied Rule", applied_rule.getPortalType())
portal_rules = getToolByName(applied_rule, 'portal_rules')
self.assertEquals(portal_rules.default_transformation_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_transformation_rule', \
applied_rule.getSpecialiseReference())
# Test deeper simulation
simulation_movement_list = applied_rule.objectValues()
self.assertEquals(2, len(simulation_movement_list))
......@@ -486,8 +486,8 @@ class TestProductionOrderApparelMixin(TestOrderMixin):
applied_rule = applied_rule_list[0]
self.assertEquals("Applied Rule", applied_rule.getPortalType())
portal_rules = getToolByName(applied_rule, 'portal_rules')
self.assertEquals(portal_rules.default_transformation_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_transformation_rule', \
applied_rule.getSpecialiseReference())
# Test deeper simulation
simulation_movement_list = list(applied_rule.objectValues())
# FIXME
......@@ -545,8 +545,8 @@ class TestProductionOrderApparelMixin(TestOrderMixin):
applied_rule = component_movement.objectValues()[0]
self.assertEquals("Applied Rule", applied_rule.getPortalType())
portal_rules = getToolByName(applied_rule, 'portal_rules')
self.assertEquals(portal_rules.default_transformation_sourcing_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_transformation_sourcing_rule', \
applied_rule.getSpecialiseReference())
# Test supply movement
simulation_movement_list = applied_rule.objectValues()
# FIXME
......@@ -684,8 +684,8 @@ class TestProductionOrderApparelMixin(TestOrderMixin):
applied_rule = applied_rule_list[0]
self.assertEquals("Applied Rule", applied_rule.getPortalType())
portal_rules = getToolByName(applied_rule, 'portal_rules')
self.assertEquals(portal_rules.default_transformation_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_transformation_rule', \
applied_rule.getSpecialiseReference())
# Test deeper simulation
simulation_movement_list = list(applied_rule.objectValues())
# FIXME
......@@ -746,8 +746,8 @@ class TestProductionOrderApparelMixin(TestOrderMixin):
applied_rule = component_movement.objectValues()[0]
self.assertEquals("Applied Rule", applied_rule.getPortalType())
portal_rules = getToolByName(applied_rule, 'portal_rules')
self.assertEquals(portal_rules.default_transformation_sourcing_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_transformation_sourcing_rule', \
applied_rule.getSpecialiseReference())
# Test supply movement
simulation_movement_list = applied_rule.objectValues()
# FIXME
......@@ -784,8 +784,8 @@ class TestProductionOrderApparelMixin(TestOrderMixin):
applied_rule = applied_rule_list[0]
self.assertEquals("Applied Rule", applied_rule.getPortalType())
portal_rules = getToolByName(applied_rule, 'portal_rules')
self.assertEquals(portal_rules.default_transformation_sourcing_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_transformation_sourcing_rule', \
applied_rule.getSpecialiseReference())
# Test deeper simulation
simulation_movement_list = list(applied_rule.objectValues())
self.assertEquals(1, len(simulation_movement_list))
......@@ -811,8 +811,8 @@ class TestProductionOrderApparelMixin(TestOrderMixin):
applied_rule = applied_rule_list[0]
self.assertEquals("Applied Rule", applied_rule.getPortalType())
portal_rules = getToolByName(applied_rule, 'portal_rules')
self.assertEquals(portal_rules.default_transformation_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_transformation_rule', \
applied_rule.getSpecialiseReference())
# Test deeper simulation
simulation_movement_list = list(applied_rule.objectValues())
# FIXME
......@@ -871,8 +871,8 @@ class TestProductionOrderApparelMixin(TestOrderMixin):
applied_rule = component_movement.objectValues()[0]
self.assertEquals("Applied Rule", applied_rule.getPortalType())
portal_rules = getToolByName(applied_rule, 'portal_rules')
self.assertEquals(portal_rules.default_transformation_sourcing_rule, \
applied_rule.getSpecialiseValue())
self.assertEquals('default_transformation_sourcing_rule', \
applied_rule.getSpecialiseReference())
# Test supply movement
simulation_movement_list = applied_rule.objectValues()
# FIXME
......
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