Commit 8a376155 authored by Sebastien Robin's avatar Sebastien Robin

add many worklist checks

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16649 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 742e1ef3
...@@ -220,6 +220,7 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -220,6 +220,7 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin, ERP5TypeTestCase):
quantity_unit_value=self.unit) quantity_unit_value=self.unit)
self.assertNotEqual(self.check_operation_line_1, None) self.assertNotEqual(self.check_operation_line_1, None)
self.assertEqual(len(self.check_deposit.objectIds()), 1) self.assertEqual(len(self.check_deposit.objectIds()), 1)
import pdb; pdb.set_trace()
def stepAddWrongCheckOperationLine(self, sequence=None, sequence_list=None, **kwd): def stepAddWrongCheckOperationLine(self, sequence=None, sequence_list=None, **kwd):
...@@ -319,6 +320,9 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -319,6 +320,9 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin, ERP5TypeTestCase):
if hasattr(self, 'check_deposit'): if hasattr(self, 'check_deposit'):
self.check_deposit_module.manage_delObjects([self.check_deposit.getId(),]) self.check_deposit_module.manage_delObjects([self.check_deposit.getId(),])
def stepCheckWorklist(self, **kw):
self.checkWorklist(self.check_deposit)
def test_01_ERP5BankingCheckDeposit(self, quiet=QUIET, run=RUN_ALL_TEST): def test_01_ERP5BankingCheckDeposit(self, quiet=QUIET, run=RUN_ALL_TEST):
""" """
Define the sequence of step that will be play Define the sequence of step that will be play
...@@ -328,8 +332,12 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -328,8 +332,12 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin, ERP5TypeTestCase):
# define the sequence # define the sequence
sequence_string1 = 'Tic CheckObjects Tic CheckInitialInventory ' \ sequence_string1 = 'Tic CheckObjects Tic CheckInitialInventory ' \
+ 'CreateCheckDepositOperation Tic ' \ + 'CreateCheckDepositOperation Tic ' \
+ 'CheckWorklist Tic ' \
+ 'AddCheckOperationLine Tic ' \ + 'AddCheckOperationLine Tic ' \
+ 'PlanCheckDepositOperation Tic OrderCheckDepositOperation ' \ + 'PlanCheckDepositOperation Tic ' \
+ 'CheckWorklist Tic ' \
+ 'OrderCheckDepositOperation Tic ' \
+ 'CheckWorklist Tic ' \
+ 'Tic DeliverCheckDepositOperation Tic ' \ + 'Tic DeliverCheckDepositOperation Tic ' \
+ 'CheckBankAccountInventoryAfterCheckDepositDelivered' + 'CheckBankAccountInventoryAfterCheckDepositDelivered'
# one to test reject # one to test reject
......
...@@ -492,6 +492,9 @@ class TestERP5BankingCheckPaymentMixin: ...@@ -492,6 +492,9 @@ class TestERP5BankingCheckPaymentMixin:
wf_id='check_workflow') wf_id='check_workflow')
self.assertEquals(check.getSimulationState(), 'confirmed') self.assertEquals(check.getSimulationState(), 'confirmed')
def stepCheckWorklist(self, **kw):
self.checkWorklist(self.check_payment)
class TestERP5BankingCheckPayment(TestERP5BankingCheckPaymentMixin, class TestERP5BankingCheckPayment(TestERP5BankingCheckPaymentMixin,
TestERP5BankingMixin, ERP5TypeTestCase): TestERP5BankingMixin, ERP5TypeTestCase):
...@@ -508,11 +511,14 @@ class TestERP5BankingCheckPayment(TestERP5BankingCheckPaymentMixin, ...@@ -508,11 +511,14 @@ class TestERP5BankingCheckPayment(TestERP5BankingCheckPaymentMixin,
# define the sequence # define the sequence
sequence_string = 'Tic CheckObjects Tic CheckInitialInventory ' \ sequence_string = 'Tic CheckObjects Tic CheckInitialInventory ' \
'CreateCheckPayment Tic ' \ 'CreateCheckPayment Tic ' \
'Tic CheckWorklist ' \
'CheckConsistency Tic ' \ 'CheckConsistency Tic ' \
'Tic CheckWorklist ' \
'stepValidateAnotherCheckPaymentWorks Tic ' \ 'stepValidateAnotherCheckPaymentWorks Tic ' \
'SendToCounter ' \ 'SendToCounter ' \
'stepValidateAnotherCheckPaymentFails Tic ' \ 'stepValidateAnotherCheckPaymentFails Tic ' \
'CheckConfirmedInventory ' \ 'CheckConfirmedInventory ' \
'Tic CheckWorklist ' \
'stepValidateAnotherCheckPaymentFailsAgain Tic ' \ 'stepValidateAnotherCheckPaymentFailsAgain Tic ' \
'InputCashDetails Tic ' \ 'InputCashDetails Tic ' \
'ResetInventory Tic ' \ 'ResetInventory Tic ' \
......
...@@ -510,6 +510,9 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -510,6 +510,9 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase
'classification_survey_workflow','deliver_action') 'classification_survey_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.failUnless(message.find('Insufficient balance')>=0)
def stepCheckWorklist(self, **kw):
self.checkWorklist(self.classification_survey)
################################## ##################################
## Tests ## Tests
################################## ##################################
...@@ -526,6 +529,7 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -526,6 +529,7 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase
+ 'CreateTwoValidIncomingLine CheckSubTotal ' \ + 'CreateTwoValidIncomingLine CheckSubTotal ' \
+ 'CreateValidOutgoingLineForInternalBanknote ' \ + 'CreateValidOutgoingLineForInternalBanknote ' \
+ 'CreateValidOutgoingLineForExternalBanknote ' \ + 'CreateValidOutgoingLineForExternalBanknote ' \
+ 'Tic CheckWorklist ' \
+ 'Tic CheckTotal ' \ + 'Tic CheckTotal ' \
+ 'CheckSource CheckDestination ' \ + 'CheckSource CheckDestination ' \
+ 'ConfirmClassificationSurvey Tic ' \ + 'ConfirmClassificationSurvey Tic ' \
...@@ -533,6 +537,7 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -533,6 +537,7 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase
+ 'ResetSourceInventory Tic ' \ + 'ResetSourceInventory Tic ' \
+ 'DeliverClassificationSurveyFails Tic ' \ + 'DeliverClassificationSurveyFails Tic ' \
+ 'DeleteResetInventory Tic ' \ + 'DeleteResetInventory Tic ' \
+ 'Tic CheckWorklist ' \
+ 'DeliverClassificationSurvey Tic ' \ + 'DeliverClassificationSurvey Tic ' \
+ 'CheckSourceDebit CheckDestinationCredit ' + 'CheckSourceDebit CheckDestinationCredit '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
......
...@@ -498,6 +498,8 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -498,6 +498,8 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase):
'counter_rendering_workflow','deliver_action') 'counter_rendering_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.failUnless(message.find('Insufficient balance')>=0)
def stepCheckWorklist(self, **kw):
self.checkWorklist(self.counter_rendering)
################################## ##################################
## Tests ## Tests
...@@ -519,12 +521,14 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -519,12 +521,14 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase):
+ 'CreateInvalidLine ' \ + 'CreateInvalidLine ' \
+ 'TryConfirmCounterRenderingWithBadInventory ' \ + 'TryConfirmCounterRenderingWithBadInventory ' \
+ 'DelInvalidLine Tic CheckTotal ' \ + 'DelInvalidLine Tic CheckTotal ' \
+ 'Tic CheckWorklist ' \
+ 'ConfirmCounterRendering ' \ + 'ConfirmCounterRendering ' \
+ 'Tic CheckSourceDebitPlanned CheckDestinationCreditPlanned ' \ + 'Tic CheckSourceDebitPlanned CheckDestinationCreditPlanned ' \
+ 'CheckSourceDebitPlanned CheckDestinationCreditPlanned ' \ + 'CheckSourceDebitPlanned CheckDestinationCreditPlanned ' \
+ 'ResetInventory Tic ' \ + 'ResetInventory Tic ' \
+ 'DeliverFails ' \ + 'DeliverFails ' \
+ 'DeleteResetInventory Tic ' \ + 'DeleteResetInventory Tic ' \
+ 'Tic CheckWorklist ' \
+ 'DeliverCounterRendering ' \ + 'DeliverCounterRendering ' \
+ 'CheckSourceDebit CheckDestinationCredit ' + 'CheckSourceDebit CheckDestinationCredit '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
......
...@@ -433,6 +433,9 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -433,6 +433,9 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin, ERP5TypeTestCase):
'destruction_survey_workflow','deliver_action') 'destruction_survey_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.failUnless(message.find('Insufficient balance')>=0)
def stepCheckWorklist(self, **kw):
self.checkWorklist(self.destruction_survey)
################################## ##################################
## Tests ## Tests
################################## ##################################
...@@ -452,10 +455,12 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -452,10 +455,12 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin, ERP5TypeTestCase):
+ 'CreateInvalidLine ' \ + 'CreateInvalidLine ' \
+ 'TryConfirmDestructionSurveyWithBadInventory ' \ + 'TryConfirmDestructionSurveyWithBadInventory ' \
+ 'DelInvalidLine Tic CheckTotal ' \ + 'DelInvalidLine Tic CheckTotal ' \
+ 'Tic CheckWorklist ' \
+ 'ConfirmDestructionSurvey ' \ + 'ConfirmDestructionSurvey ' \
+ 'ResetSourceInventory Tic ' \ + 'ResetSourceInventory Tic ' \
+ 'DeliverDestructionSurveyFails Tic ' \ + 'DeliverDestructionSurveyFails Tic ' \
+ 'DeleteResetInventory Tic ' \ + 'DeleteResetInventory Tic ' \
+ 'Tic CheckWorklist ' \
+ 'DeliverDestructionSurvey ' \ + 'DeliverDestructionSurvey ' \
+ 'CheckSourceFinal CheckDestinationFinal ' + 'CheckSourceFinal CheckDestinationFinal '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
......
...@@ -357,6 +357,9 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -357,6 +357,9 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.reception.getRelativeUrl(), resource = self.usd_billet_20.getRelativeUrl()), 5.0) self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.reception.getRelativeUrl(), resource = self.usd_billet_20.getRelativeUrl()), 5.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.reception.getRelativeUrl(), resource = self.usd_billet_20.getRelativeUrl()), 5.0) self.assertEqual(self.simulation_tool.getFutureInventory(node=self.reception.getRelativeUrl(), resource = self.usd_billet_20.getRelativeUrl()), 5.0)
def stepCheckWorklist(self, **kw):
self.checkWorklist(self.foreign_cash_reception)
################################## ##################################
## Tests ## Tests
################################## ##################################
...@@ -375,8 +378,10 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -375,8 +378,10 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase
+ 'CreateValidLine2 Tic ' \ + 'CreateValidLine2 Tic ' \
+ 'CheckValidLine1 ' \ + 'CheckValidLine1 ' \
+ 'CheckValidLine2 ' \ + 'CheckValidLine2 ' \
+ 'Tic CheckWorklist ' \
+ 'ConfirmForeignCashReception Tic ' \ + 'ConfirmForeignCashReception Tic ' \
+ 'CheckConfirmedInventory ' \ + 'CheckConfirmedInventory ' \
+ 'Tic CheckWorklist ' \
+ 'DeliverForeignCashReception Tic ' \ + 'DeliverForeignCashReception Tic ' \
+ 'CheckFinalInventory' + 'CheckFinalInventory'
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
......
...@@ -178,7 +178,6 @@ class TestERP5BankingInternalMoneyDeposit(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -178,7 +178,6 @@ class TestERP5BankingInternalMoneyDeposit(TestERP5BankingMixin, ERP5TypeTestCase
self.internal_money_deposit = self.internal_money_deposit_module.newContent( self.internal_money_deposit = self.internal_money_deposit_module.newContent(
id='internal_money_deposit', id='internal_money_deposit',
portal_type='Internal Money Deposit', portal_type='Internal Money Deposit',
destination_value=self.bi_counter,
resource_value = self.currency_1, resource_value = self.currency_1,
source_total_asset_price=20000.0, source_total_asset_price=20000.0,
grouping_reference="lettering", grouping_reference="lettering",
...@@ -264,7 +263,8 @@ class TestERP5BankingInternalMoneyDeposit(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -264,7 +263,8 @@ class TestERP5BankingInternalMoneyDeposit(TestERP5BankingMixin, ERP5TypeTestCase
""" """
self.internal_money_deposit_module.deleteContent('internal_money_deposit_1') self.internal_money_deposit_module.deleteContent('internal_money_deposit_1')
def stepCheckWorklist(self, **kw):
self.checkWorklist(self.internal_money_deposit)
################################## ##################################
## Tests ## Tests
...@@ -280,6 +280,7 @@ class TestERP5BankingInternalMoneyDeposit(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -280,6 +280,7 @@ class TestERP5BankingInternalMoneyDeposit(TestERP5BankingMixin, ERP5TypeTestCase
sequence_string = 'Tic CheckObjects Tic CheckInitialInventory ' \ sequence_string = 'Tic CheckObjects Tic CheckInitialInventory ' \
+ 'CreateInternalMoneyDeposit ' \ + 'CreateInternalMoneyDeposit ' \
+ 'InputCashDetails Tic ' \ + 'InputCashDetails Tic ' \
+ 'Tic CheckWorklist ' \
+ 'DeliverInternalMoneyDeposit Tic ' \ + 'DeliverInternalMoneyDeposit Tic ' \
+ 'CheckFinalInventory' + 'CheckFinalInventory'
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
......
...@@ -792,6 +792,9 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase) ...@@ -792,6 +792,9 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase)
'monetary_destruction_workflow','deliver_action') 'monetary_destruction_workflow','deliver_action')
self.failUnless(message.find('Insufficient balance')>=0) self.failUnless(message.find('Insufficient balance')>=0)
def stepCheckWorklist(self, **kw):
self.checkWorklist(self.monetary_destruction)
################################## ##################################
## Tests ## Tests
################################## ##################################
...@@ -812,11 +815,13 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase) ...@@ -812,11 +815,13 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase)
+ 'TryPlannedMonetaryDestructionWithBadInventory ' \ + 'TryPlannedMonetaryDestructionWithBadInventory ' \
+ 'DelInvalidLine Tic CheckTotal ' \ + 'DelInvalidLine Tic CheckTotal ' \
+ 'SetMonetaryDestructionSourceTotalAssetPrice ' \ + 'SetMonetaryDestructionSourceTotalAssetPrice ' \
+ 'Tic CheckWorklist ' \
+ 'PlannedMonetaryDestruction ' \ + 'PlannedMonetaryDestruction ' \
+ 'CheckSourceDebitPlanned ' \ + 'CheckSourceDebitPlanned ' \
+ 'ResetInventory Tic ' \ + 'ResetInventory Tic ' \
+ 'ValidateFails ' \ + 'ValidateFails ' \
+ 'DeleteResetInventory Tic ' \ + 'DeleteResetInventory Tic ' \
+ 'Tic CheckWorklist ' \
+ 'ValidateMonetaryDestruction ' \ + 'ValidateMonetaryDestruction ' \
+ 'CheckSourceDebit ' \ + 'CheckSourceDebit ' \
+ 'Tic DelMonetaryDestruction Tic' + 'Tic DelMonetaryDestruction 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