[Erp5-report] r36606 kazuhiko - /erp5/trunk/products/ERP5/tests/testERP5Simulation.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Jun 25 17:48:01 CEST 2010


Author: kazuhiko
Date: Fri Jun 25 17:47:55 2010
New Revision: 36606

URL: http://svn.erp5.org?rev=36606&view=rev
Log:
add one more simple test.

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

Modified: erp5/trunk/products/ERP5/tests/testERP5Simulation.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testERP5Simulation.py?rev=36606&r1=36605&r2=36606&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testERP5Simulation.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testERP5Simulation.py [utf8] Fri Jun 25 17:47:55 2010
@@ -633,11 +633,17 @@ class TestAutomaticSolvingPackingList(Te
     self.portal.portal_rules.new_delivery_simulation_rule.quantity_tester.edit(
       solver=('portal_solvers/Automatic Quantity Accept Solver',))
 
+  def stepSetUpAutomaticQuantityAdoptSolver(self, sequence=None, sequence_list=None):
+    self._setUpTargetSolver('Automatic Quantity Adopt Solver',
+                            'AdoptSolver', ('quantity',))
+    self.portal.portal_rules.new_delivery_simulation_rule.quantity_tester.edit(
+      solver=('portal_solvers/Automatic Quantity Adopt Solver',))
+
   def test_01_PackingListDecreaseQuantity(self, quiet=quiet):
     """
       Change the quantity on an delivery line, then
-      see if the packing list is divergent and then
-      split and defer the packing list
+      see if the packing list is solved automatically
+      with accept solver.
     """
     sequence_list = SequenceList()
 
@@ -654,6 +660,27 @@ class TestAutomaticSolvingPackingList(Te
 
     sequence_list.play(self, quiet=quiet)
 
+  def test_02_PackingListDecreaseQuantity(self, quiet=quiet):
+    """
+      Change the quantity on an delivery line, then
+      see if the packing list is solved automatically
+      with adopt solver.
+    """
+    sequence_list = SequenceList()
+
+    # Test with a simply order without cell
+    sequence_string = '\
+                      stepSetUpAutomaticQuantityAdoptSolver \
+                      ' + self.default_sequence + '\
+                      stepDecreasePackingListLineQuantity \
+                      stepCheckPackingListIsCalculating \
+                      stepTic \
+                      stepCheckPackingListIsSolved \
+                      '
+    sequence_list.addSequenceString(sequence_string)
+
+    sequence_list.play(self, quiet=quiet)
+
 def test_suite():
   suite = unittest.TestSuite()
   suite.addTest(unittest.makeSuite(TestERP5Simulation))




More information about the Erp5-report mailing list