From 2a2bda374093a59798a4310f575e640927446e74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Fri, 20 Oct 2006 11:41:44 +0000 Subject: [PATCH] check no more mutilated banknote defined on document if we sent them to headquarter git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10846 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../tests/testERP5BankingMutilatedBanknote.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/product/ERP5Banking/tests/testERP5BankingMutilatedBanknote.py b/product/ERP5Banking/tests/testERP5BankingMutilatedBanknote.py index 0e3885ea91..5a52ba2cea 100755 --- a/product/ERP5Banking/tests/testERP5BankingMutilatedBanknote.py +++ b/product/ERP5Banking/tests/testERP5BankingMutilatedBanknote.py @@ -319,6 +319,15 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase): self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.mutilated_banknote_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0) self.assertEqual(self.simulation_tool.getFutureInventory(node=self.mutilated_banknote_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0) + def stepCheckFinalInventoryWithNoPayBackAfterHQRequest(self, sequence=None, sequence_list=None, **kwd): + """ + Check the initial inventory before any operations + """ + self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.usual_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0) + self.assertEqual(self.simulation_tool.getFutureInventory(node=self.usual_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0) + self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.mutilated_banknote_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0) + self.assertEqual(self.simulation_tool.getFutureInventory(node=self.mutilated_banknote_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0) + def stepClearMutilatedBanknoteModule(self, sequence=None, sequence_list=None, **kw): """ Remove all operations in module @@ -428,8 +437,8 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase): """ self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.usual_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0) self.assertEqual(self.simulation_tool.getFutureInventory(node=self.usual_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0) - self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.mutilated_banknote_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0) - self.assertEqual(self.simulation_tool.getFutureInventory(node=self.mutilated_banknote_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0) + self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.mutilated_banknote_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0) + self.assertEqual(self.simulation_tool.getFutureInventory(node=self.mutilated_banknote_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0) # # Headquarter part @@ -642,7 +651,7 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase): + 'HQLogout CheckHQFinalInventoryWithNoPayBack ' \ + 'ClearHQMutilatedBanknoteModule Tic ' \ + 'TryDeliverFromOrderedStateWithWrongAmountDefined DeliverDocumentFromOrderedState Tic ' \ - + 'CheckFinalInventoryWithNoPayBack ClearMutilatedBanknoteModule' + + 'CheckFinalInventoryWithNoPayBackAfterHQRequest ClearMutilatedBanknoteModule' # sequence 4 : ask headquarters then payback sequence_string_4 = 'Tic CheckObjects Tic CheckInitialInventory ' \ -- 2.30.9