Commit a52fece9 authored by Alexandre Boeglin's avatar Alexandre Boeglin

fixed failing test, added new test to test failure case as well


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16759 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e731478c
...@@ -946,9 +946,10 @@ class TestInvoice(TestPackingListMixin, ...@@ -946,9 +946,10 @@ class TestInvoice(TestPackingListMixin,
# check which activities are failing # check which activities are failing
self.assertTrue(str(exc).startswith('tic is looping forever.'), self.assertTrue(str(exc).startswith('tic is looping forever.'),
'%s does not start with "tic is looping forever."' % str(exc)) '%s does not start with "tic is looping forever."' % str(exc))
self.failIfDifferentSet(['/'.join(x.object_path) for x in msg_list = ['/'.join(x.object_path) for x in
self.getActivityTool().getMessageList()], [invoice.getPath(), self.getActivityTool().getMessageList()]
it_builder.getPath()]) self.assertTrue(it_builder.getPath() in msg_list, '%s in %s' %
(it_builder.getPath(), msg_list))
# flush failing activities # flush failing activities
activity_tool = self.getActivityTool() activity_tool = self.getActivityTool()
activity_tool.manageClearActivities(keep=0) activity_tool.manageClearActivities(keep=0)
...@@ -1354,10 +1355,46 @@ class TestInvoice(TestPackingListMixin, ...@@ -1354,10 +1355,46 @@ class TestInvoice(TestPackingListMixin,
""" """
self.playSequence(sequence, quiet=quiet) self.playSequence(sequence, quiet=quiet)
def test_09_InvoiceChangeStartDate(self, quiet=quiet, run=RUN_ALL_TESTS): def test_09_InvoiceChangeStartDateFail(self, quiet=quiet,
run=RUN_ALL_TESTS):
"""
Change the start_date of a Invoice Line,
check that the invoice is divergent,
then accept decision, and check Packing list is divergent
"""
if not run: return
if not quiet:
self.logMessage('Invoice Change Sart Date')
sequence = self.PACKING_LIST_DEFAULT_SEQUENCE + \
"""
stepSetReadyPackingList
stepTic
stepStartPackingList
stepCheckInvoicingRule
stepCheckInvoiceTransactionRule
stepTic
stepCheckInvoiceBuilding
stepChangeInvoiceStartDate
stepCheckInvoiceIsDivergent
stepCheckInvoiceIsCalculating
stepAcceptDecisionInvoice
stepTic
stepCheckInvoiceNotSplitted
stepCheckInvoiceIsNotDivergent
stepCheckInvoiceIsSolved
stepCheckPackingListIsDivergent
"""
self.playSequence(sequence, quiet=quiet)
def test_09b_InvoiceChangeStartDateSucceed(self, quiet=quiet,
run=RUN_ALL_TESTS):
""" """
Change the start_date of a Invoice Line, Change the start_date of a Invoice Line,
check that the invoice is divergent, check that the invoice is divergent,
deliver the Packing List to make sure it's frozen,
then accept decision, and check everything is solved then accept decision, and check everything is solved
""" """
if not run: return if not run: return
...@@ -1372,6 +1409,10 @@ class TestInvoice(TestPackingListMixin, ...@@ -1372,6 +1409,10 @@ class TestInvoice(TestPackingListMixin,
stepCheckInvoiceTransactionRule stepCheckInvoiceTransactionRule
stepTic stepTic
stepCheckInvoiceBuilding stepCheckInvoiceBuilding
stepStopPackingList
stepTic
stepDeliverPackingList
stepTic
stepChangeInvoiceStartDate stepChangeInvoiceStartDate
stepCheckInvoiceIsDivergent stepCheckInvoiceIsDivergent
......
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