Commit 82866741 authored by Aurel's avatar Aurel

remove order step from workflow

remove check of wf history length


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15033 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1686b3a9
...@@ -499,42 +499,16 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -499,42 +499,16 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase):
self.assertEqual(self.cash_sorting.getTotalPrice(), (10000 * 5.0 + 200 * 12.0 + 5000 * 24.0) * 2.0) self.assertEqual(self.cash_sorting.getTotalPrice(), (10000 * 5.0 + 200 * 12.0 + 5000 * 24.0) * 2.0)
def stepOrderCashSorting(self, sequence=None, sequence_list=None, **kwd):
"""
Order the cash sorting and check it
"""
# fix amount (10000 * 5.0 + 200 * 12.0 + 5000 * 24)
self.cash_sorting.setSourceTotalAssetPrice('172400.0')
# do the Workflow action
self.workflow_tool.doActionFor(self.cash_sorting, 'order_action', wf_id='cash_sorting_workflow')
# execute tic
self.stepTic()
# get state
state = self.cash_sorting.getSimulationState()
# check state is confirmed
self.assertEqual(state, 'ordered')
# get workflow history
workflow_history = self.workflow_tool.getInfoFor(ob=self.cash_sorting, name='history', wf_id='cash_sorting_workflow')
# check len of workflow history is 4
self.assertEqual(len(workflow_history), 3)
def stepConfirmCashSorting(self, sequence=None, sequence_list=None, **kwd): def stepConfirmCashSorting(self, sequence=None, sequence_list=None, **kwd):
""" """
Confirm the cash sorting and check it Confirm the cash sorting and check it
""" """
# do the Workflow action # do the Workflow action
self.cash_sorting.setSourceTotalAssetPrice('172400.0')
self.workflow_tool.doActionFor(self.cash_sorting, 'confirm_action', wf_id='cash_sorting_workflow') self.workflow_tool.doActionFor(self.cash_sorting, 'confirm_action', wf_id='cash_sorting_workflow')
# execute tic
self.stepTic() self.stepTic()
# get state
state = self.cash_sorting.getSimulationState() state = self.cash_sorting.getSimulationState()
# check state is confirmed
self.assertEqual(state, 'confirmed') self.assertEqual(state, 'confirmed')
# get workflow history
workflow_history = self.workflow_tool.getInfoFor(ob=self.cash_sorting, name='history', wf_id='cash_sorting_workflow')
# check len of workflow history is 6
self.assertEqual(len(workflow_history), 5)
def stepCheckSourceDebitPlanned(self, sequence=None, sequence_list=None, **kwd): def stepCheckSourceDebitPlanned(self, sequence=None, sequence_list=None, **kwd):
...@@ -577,18 +551,10 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -577,18 +551,10 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase):
Deliver the cash sorting with a good user Deliver the cash sorting with a good user
and check that the deliver of a cash tranfer have achieved and check that the deliver of a cash tranfer have achieved
""" """
# self.security_manager = AccessControl.getSecurityManager()
# self.user = self.security_manager.getUser()
# do the workflow transition "deliver_action"
self.workflow_tool.doActionFor(self.cash_sorting, 'deliver_action', wf_id='cash_sorting_workflow') self.workflow_tool.doActionFor(self.cash_sorting, 'deliver_action', wf_id='cash_sorting_workflow')
# execute tic
self.stepTic() self.stepTic()
# get state of cash sorting
state = self.cash_sorting.getSimulationState() state = self.cash_sorting.getSimulationState()
# check that state is delivered
self.assertEqual(state, 'delivered') self.assertEqual(state, 'delivered')
# get workflow history
workflow_history = self.workflow_tool.getInfoFor(ob=self.cash_sorting, name='history', wf_id='cash_sorting_workflow')
def stepCheckSourceDebit(self, sequence=None, sequence_list=None, **kwd): def stepCheckSourceDebit(self, sequence=None, sequence_list=None, **kwd):
""" """
...@@ -655,7 +621,6 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -655,7 +621,6 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase):
+ 'CreateValidOutgoingLineForExternalBanknote ' \ + 'CreateValidOutgoingLineForExternalBanknote ' \
+ 'CreateValidOutgoingLineForInternalAndCancelledBanknote Tic CheckTotal ' \ + 'CreateValidOutgoingLineForInternalAndCancelledBanknote Tic CheckTotal ' \
+ 'CheckSource CheckDestination ' \ + 'CheckSource CheckDestination ' \
+ 'OrderCashSorting Tic '\
+ 'ConfirmCashSorting Tic ' \ + 'ConfirmCashSorting Tic ' \
+ 'CheckSourceDebitPlanned CheckDestinationCreditPlanned ' \ + 'CheckSourceDebitPlanned CheckDestinationCreditPlanned ' \
+ 'ResetSourceInventory Tic ' \ + 'ResetSourceInventory Tic ' \
......
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