Commit ac86b0f8 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

add one more simple test.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36606 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent efb47f18
......@@ -633,11 +633,17 @@ class TestAutomaticSolvingPackingList(TestERP5SimulationMixin, TestPackingListMi
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(TestERP5SimulationMixin, TestPackingListMi
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))
......
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