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