From 325ee49357d161ab136c63381e7cc9b8dc977e47 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Tue, 24 Jul 2007 11:38:30 +0000 Subject: [PATCH] - default state on many worklow is "empty" now - open some counter git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15292 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Banking/tests/TestERP5BankingMixin.py | 2 ++ product/ERP5Banking/tests/testERP5BankingAvailableInventory.py | 2 +- product/ERP5Banking/tests/testERP5BankingCashExchange.py | 1 + product/ERP5Banking/tests/testERP5BankingCashMovement.py | 2 +- .../ERP5Banking/tests/testERP5BankingCashToCurrencyPurchase.py | 1 + product/ERP5Banking/tests/testERP5BankingCashToCurrencySale.py | 1 + product/ERP5Banking/tests/testERP5BankingDestructionSurvey.py | 2 +- .../ERP5Banking/tests/testERP5BankingForeignCashReception.py | 2 +- product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py | 2 +- product/ERP5Banking/tests/testERP5BankingMonetaryIssue.py | 2 +- product/ERP5Banking/tests/testERP5BankingMonetaryRecall.py | 2 +- product/ERP5Banking/tests/testERP5BankingMonetaryReception.py | 2 +- product/ERP5Banking/tests/testERP5BankingMonetarySurvey.py | 2 +- product/ERP5Banking/tests/testERP5BankingTravelerCheckSale.py | 1 - 14 files changed, 14 insertions(+), 10 deletions(-) diff --git a/product/ERP5Banking/tests/TestERP5BankingMixin.py b/product/ERP5Banking/tests/TestERP5BankingMixin.py index d1823d1a96..709abfbf86 100644 --- a/product/ERP5Banking/tests/TestERP5BankingMixin.py +++ b/product/ERP5Banking/tests/TestERP5BankingMixin.py @@ -682,6 +682,8 @@ class TestERP5BankingMixin: """ # create a counter counter_module = self.getCounterModule() + while "guichet" not in site.getId(): + site = site.getParentValue() counter = counter_module.newContent(id=id, site_value=site) # open it counter.open() diff --git a/product/ERP5Banking/tests/testERP5BankingAvailableInventory.py b/product/ERP5Banking/tests/testERP5BankingAvailableInventory.py index 5fb9fefb61..8ea7eb1e3d 100755 --- a/product/ERP5Banking/tests/testERP5BankingAvailableInventory.py +++ b/product/ERP5Banking/tests/testERP5BankingAvailableInventory.py @@ -103,7 +103,7 @@ class TestERP5BankingAvailableInventory(TestERP5BankingCheckPaymentMixin, currency=self.currency_1, line_list=self.line_list) - self.openCounter(site=self.money_deposit_counter_vault,id='counter_2') + self.openCounter(site=self.money_deposit_counter.guichet_1,id='counter_2') # Define foreign currency variables inventory_dict_line_1 = {'id' : 'inventory_line_1', diff --git a/product/ERP5Banking/tests/testERP5BankingCashExchange.py b/product/ERP5Banking/tests/testERP5BankingCashExchange.py index 803d9f2ed8..8cd67b6ac7 100644 --- a/product/ERP5Banking/tests/testERP5BankingCashExchange.py +++ b/product/ERP5Banking/tests/testERP5BankingCashExchange.py @@ -164,6 +164,7 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin, ERP5TypeTestCase): # open counter date and counter self.openCounterDate(site=self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies.sortante) + self.openCounter(site=self.paris.surface.banque_interne.guichet_1) def stepCheckObjects(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingCashMovement.py b/product/ERP5Banking/tests/testERP5BankingCashMovement.py index 59864c787f..198a15aa95 100644 --- a/product/ERP5Banking/tests/testERP5BankingCashMovement.py +++ b/product/ERP5Banking/tests/testERP5BankingCashMovement.py @@ -406,7 +406,7 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin, ERP5TypeTestCase): # get state of the cash_movement state = self.cash_movement.getSimulationState() # check the state is draft - self.assertEqual(state, 'draft') + self.assertEqual(state, 'empty') # get workflow history workflow_history = self.workflow_tool.getInfoFor(ob=self.cash_movement, name='history', wf_id='cash_movement_workflow') # check its len is 2 diff --git a/product/ERP5Banking/tests/testERP5BankingCashToCurrencyPurchase.py b/product/ERP5Banking/tests/testERP5BankingCashToCurrencyPurchase.py index fe7a0034ce..08adc869bb 100644 --- a/product/ERP5Banking/tests/testERP5BankingCashToCurrencyPurchase.py +++ b/product/ERP5Banking/tests/testERP5BankingCashToCurrencyPurchase.py @@ -151,6 +151,7 @@ class TestERP5BankingCashToCurrencyPurchase(TestERP5BankingMixin, ERP5TypeTestCa self.login('super_user') # open counter date and counter self.openCounterDate(site=self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies.sortante) + self.openCounter(site=self.paris.surface.banque_interne.guichet_1) diff --git a/product/ERP5Banking/tests/testERP5BankingCashToCurrencySale.py b/product/ERP5Banking/tests/testERP5BankingCashToCurrencySale.py index f8f65b802f..981242e91e 100644 --- a/product/ERP5Banking/tests/testERP5BankingCashToCurrencySale.py +++ b/product/ERP5Banking/tests/testERP5BankingCashToCurrencySale.py @@ -141,6 +141,7 @@ class TestERP5BankingCashToCurrencySale(TestERP5BankingMixin, ERP5TypeTestCase): self.login('super_user') # open counter date and counter self.openCounterDate(site=self.paris.surface.banque_interne.guichet_1) + self.openCounter(site=self.paris.surface.banque_interne.guichet_1) diff --git a/product/ERP5Banking/tests/testERP5BankingDestructionSurvey.py b/product/ERP5Banking/tests/testERP5BankingDestructionSurvey.py index ef00557757..a8463cd443 100644 --- a/product/ERP5Banking/tests/testERP5BankingDestructionSurvey.py +++ b/product/ERP5Banking/tests/testERP5BankingDestructionSurvey.py @@ -322,7 +322,7 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin, ERP5TypeTestCase): # get state of the cash transfer state = self.destruction_survey.getSimulationState() # check the state is draft - self.assertEqual(state, 'draft') + self.assertEqual(state, 'empty') # get workflow history workflow_history = self.workflow_tool.getInfoFor(ob=self.destruction_survey, name='history', wf_id='destruction_survey_workflow') # check its len is 2 diff --git a/product/ERP5Banking/tests/testERP5BankingForeignCashReception.py b/product/ERP5Banking/tests/testERP5BankingForeignCashReception.py index 2296ba6515..6df9ea36e5 100755 --- a/product/ERP5Banking/tests/testERP5BankingForeignCashReception.py +++ b/product/ERP5Banking/tests/testERP5BankingForeignCashReception.py @@ -310,7 +310,7 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase """ state = self.foreign_cash_reception.getSimulationState() # check that state is draft - self.assertEqual(state, 'draft') + self.assertEqual(state, 'empty') self.workflow_tool.doActionFor(self.foreign_cash_reception, 'confirm_action', wf_id='foreign_cash_reception_workflow') self.assertEqual(self.foreign_cash_reception.getSimulationState(), 'confirmed') workflow_history = self.workflow_tool.getInfoFor(ob=self.foreign_cash_reception, name='history', wf_id='foreign_cash_reception_workflow') diff --git a/product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py b/product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py index 132d7a0bfd..590b582b59 100644 --- a/product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py +++ b/product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py @@ -526,7 +526,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase) # get state of the monetary destruction state = self.monetary_destruction.getSimulationState() # check the state is draft - self.assertEqual(state, 'draft') + self.assertEqual(state, 'empty') # get workflow history workflow_history = self.workflow_tool.getInfoFor(ob=self.monetary_destruction, name='history', wf_id='monetary_destruction_workflow') # check its len is 2 diff --git a/product/ERP5Banking/tests/testERP5BankingMonetaryIssue.py b/product/ERP5Banking/tests/testERP5BankingMonetaryIssue.py index d0a39444d8..736f12decb 100755 --- a/product/ERP5Banking/tests/testERP5BankingMonetaryIssue.py +++ b/product/ERP5Banking/tests/testERP5BankingMonetaryIssue.py @@ -382,7 +382,7 @@ class TestERP5BankingMonetaryIssue(TestERP5BankingMonetaryReceptionMixin, TestER self.monetary_issue.setSourceTotalAssetPrice('2000000.0') state = self.monetary_issue.getSimulationState() # check that state is draft - self.assertEqual(state, 'draft') + self.assertEqual(state, 'empty') self.workflow_tool.doActionFor(self.monetary_issue, 'confirm_action', wf_id='monetary_issue_workflow') self.assertEqual(self.monetary_issue.getSimulationState(), 'confirmed') workflow_history = self.workflow_tool.getInfoFor(ob=self.monetary_issue, name='history', wf_id='monetary_issue_workflow') diff --git a/product/ERP5Banking/tests/testERP5BankingMonetaryRecall.py b/product/ERP5Banking/tests/testERP5BankingMonetaryRecall.py index 326c980501..8d7c71d2fc 100755 --- a/product/ERP5Banking/tests/testERP5BankingMonetaryRecall.py +++ b/product/ERP5Banking/tests/testERP5BankingMonetaryRecall.py @@ -369,7 +369,7 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin, ERP5TypeTestCase): # get state of the monetary recall state = self.monetary_recall.getSimulationState() # check the state is draft - self.assertEqual(state, 'draft') + self.assertEqual(state, 'empty') # get workflow history workflow_history = self.workflow_tool.getInfoFor(ob=self.monetary_recall, name='history', wf_id='monetary_recall_workflow') # check its len is 2 diff --git a/product/ERP5Banking/tests/testERP5BankingMonetaryReception.py b/product/ERP5Banking/tests/testERP5BankingMonetaryReception.py index a0b783fb8b..6ff2a49ba8 100755 --- a/product/ERP5Banking/tests/testERP5BankingMonetaryReception.py +++ b/product/ERP5Banking/tests/testERP5BankingMonetaryReception.py @@ -300,7 +300,7 @@ class TestERP5BankingMonetaryReception(TestERP5BankingMixin, ERP5TypeTestCase): """ state = self.monetary_reception.getSimulationState() # check that state is draft - self.assertEqual(state, 'draft') + self.assertEqual(state, 'empty') self.workflow_tool.doActionFor(self.monetary_reception, 'confirm_action', wf_id='monetary_reception_workflow') self.assertEqual(self.monetary_reception.getSimulationState(), 'confirmed') workflow_history = self.workflow_tool.getInfoFor(ob=self.monetary_reception, name='history', wf_id='monetary_reception_workflow') diff --git a/product/ERP5Banking/tests/testERP5BankingMonetarySurvey.py b/product/ERP5Banking/tests/testERP5BankingMonetarySurvey.py index fa779ad7da..906a609f88 100755 --- a/product/ERP5Banking/tests/testERP5BankingMonetarySurvey.py +++ b/product/ERP5Banking/tests/testERP5BankingMonetarySurvey.py @@ -335,7 +335,7 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin, ERP5TypeTestCase): # get state of the cash transfer state = self.monetary_survey.getSimulationState() # check the state is draft - self.assertEqual(state, 'draft') + self.assertEqual(state, 'empty') # get workflow history workflow_history = self.workflow_tool.getInfoFor(ob=self.monetary_survey, name='history', wf_id='monetary_survey_workflow') # check its len is 2 diff --git a/product/ERP5Banking/tests/testERP5BankingTravelerCheckSale.py b/product/ERP5Banking/tests/testERP5BankingTravelerCheckSale.py index 8f50ff9200..95ecf221c6 100755 --- a/product/ERP5Banking/tests/testERP5BankingTravelerCheckSale.py +++ b/product/ERP5Banking/tests/testERP5BankingTravelerCheckSale.py @@ -126,7 +126,6 @@ class TestERP5BankingTravelerCheckSaleMixin: self.reception_destination_site = self.paris self.destination_site = self.paris.surface.banque_interne.guichet_1 self.source_vault = self.paris.surface.caisse_courante.encaisse_des_billets_et_monnaies - self.destination_vault = self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies self.destination_vault = self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies self.traveler_check_source = self.destination_vault -- 2.30.9