From 5b212ef54a5b11f5d35166e507b2d99ed93d77c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Wed, 4 Apr 2007 13:12:51 +0000 Subject: [PATCH] add step to clear moduel between sequence git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13931 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../tests/testERP5BankingCheckDeposit.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/product/ERP5Banking/tests/testERP5BankingCheckDeposit.py b/product/ERP5Banking/tests/testERP5BankingCheckDeposit.py index 1ec99976f4..cc30f9d82c 100755 --- a/product/ERP5Banking/tests/testERP5BankingCheckDeposit.py +++ b/product/ERP5Banking/tests/testERP5BankingCheckDeposit.py @@ -264,6 +264,21 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin, ERP5TypeTestCase): self.assertEqual(self.simulation_tool.getCurrentInventory(payment=self.bank_account_2.getRelativeUrl()), 50000) self.assertEqual(self.simulation_tool.getFutureInventory(payment=self.bank_account_2.getRelativeUrl()), 50000) + def stepClearCheck(self, sequence=None, sequence_list=None, **kw): + """ + Remove previous check and create a new one with same reference + """ + self.checkbook_1.manage_delObjects([self.check_1.getId(),]) + self.check_1 = self.createCheck(id='check_1', + reference='CHKNB1', + checkbook=self.checkbook_1) + + def stepClearCheckDepositModule(self, sequence=None, sequence_list=None, **kw): + """ + Clear the check deposit module + """ + if hasattr(self, 'check_deposit'): + self.check_deposit_module.manage_delObjects([self.check_deposit.getId(),]) def test_01_ERP5BankingCheckDeposit(self, quiet=QUIET, run=RUN_ALL_TEST): """ @@ -279,7 +294,8 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin, ERP5TypeTestCase): + 'Tic DeliverCheckDepositOperation Tic ' \ + 'CheckBankAccountInventoryAfterCheckDepositDelivered' - sequence_string2 = 'Tic CheckObjects Tic CheckInitialInventory ' \ + sequence_string2 = 'Tic ClearCheck ClearCheckDepositModule Tic '\ + + 'CheckObjects Tic CheckInitialInventory ' \ + 'CreateCheckDepositOperation Tic ' \ + 'AddCheckOperationLine Tic ' \ + 'PlanCheckDepositOperation Tic OrderCheckDepositOperation ' \ -- 2.30.9