[Erp5-report] r31152 kazuhiko - /erp5/trunk/products/ERP5/tests/testOrder.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Dec 8 13:59:26 CET 2009


Author: kazuhiko
Date: Tue Dec  8 13:59:25 2009
New Revision: 31152

URL: http://svn.erp5.org?rev=31152&view=rev
Log:
rule should be identified by the reference not by the id.

Modified:
    erp5/trunk/products/ERP5/tests/testOrder.py

Modified: erp5/trunk/products/ERP5/tests/testOrder.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testOrder.py?rev=31152&r1=31151&r2=31152&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testOrder.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testOrder.py [utf8] Tue Dec  8 13:59:25 2009
@@ -761,12 +761,12 @@
     """
       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)
 
-  def checkOrderRuleSimulation(self, rule_id, sequence=None, sequence_list=None, **kw):
-    """
-      Test if simulation is matching order, be sure that rule_id is used
+  def checkOrderRuleSimulation(self, rule_reference, sequence=None, sequence_list=None, **kw):
+    """
+      Test if simulation is matching order, be sure that rule_reference is used
       to expand simulation for order
     """
     order = sequence.get('order')
@@ -787,10 +787,10 @@
       self.failUnless(order_state, \
                       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')
-      self.assertEquals(getattr(portal_rules,rule_id), \
-                        applied_rule.getSpecialiseValue())
+      self.assertEquals(rule_reference,
+                        applied_rule.getSpecialiseReference())
 
       simulation_movement_list = applied_rule.objectValues()
       sequence.edit(simulation_movement_list=simulation_movement_list)




More information about the Erp5-report mailing list