Commit d5fcfaea authored by Sebastien Robin's avatar Sebastien Robin

make sure to wait activities when create checkbook reception, renamed the...

make sure to wait activities when create checkbook reception, renamed the method SendToValidation to MoneyDepositSendToValidation

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15387 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9bd0cc05
...@@ -330,6 +330,7 @@ class TestERP5BankingAvailableInventory(TestERP5BankingCheckPaymentMixin, ...@@ -330,6 +330,7 @@ class TestERP5BankingAvailableInventory(TestERP5BankingCheckPaymentMixin,
'CreateMoneyDeposit ' \ 'CreateMoneyDeposit ' \
'ValidateAnotherCheckPaymentWorks Tic ' \ 'ValidateAnotherCheckPaymentWorks Tic ' \
'SendToCounter ' \ 'SendToCounter ' \
'MoneyDepositSendToValidation ' \
'MoneyDepositSendToCounter ' \ 'MoneyDepositSendToCounter ' \
'stepValidateAnotherCheckPaymentFails Tic ' \ 'stepValidateAnotherCheckPaymentFails Tic ' \
'CheckAccountConfirmedInventory ' \ 'CheckAccountConfirmedInventory ' \
......
...@@ -235,7 +235,11 @@ class TestERP5BankingCashToCurrencyPurchase(TestERP5BankingMixin, ERP5TypeTestCa ...@@ -235,7 +235,11 @@ class TestERP5BankingCashToCurrencyPurchase(TestERP5BankingMixin, ERP5TypeTestCa
self.cash_to_currency_purchase.setDiscountRatio(None) self.cash_to_currency_purchase.setDiscountRatio(None)
self.cash_to_currency_purchase.setDiscount(3000) self.cash_to_currency_purchase.setDiscount(3000)
self.assertEqual(script(),62000) self.assertEqual(script(),62000)
# Check that we can define a specific rate
self.cash_to_currency_purchase.setCurrencyExchangeRate(660)
self.assertEqual(script(),63000)
self.cash_to_currency_purchase.setCurrencyExchangeRate(None)
self.assertEqual(script(),62000)
#def stepCreateValidIncomingLine(self, sequence=None, sequence_list=None, **kwd): #def stepCreateValidIncomingLine(self, sequence=None, sequence_list=None, **kwd):
def stepCreateValidIncomingLine(self, sequence=None, sequence_list=None, **kwd): def stepCreateValidIncomingLine(self, sequence=None, sequence_list=None, **kwd):
...@@ -394,7 +398,6 @@ class TestERP5BankingCashToCurrencyPurchase(TestERP5BankingMixin, ERP5TypeTestCa ...@@ -394,7 +398,6 @@ class TestERP5BankingCashToCurrencyPurchase(TestERP5BankingMixin, ERP5TypeTestCa
def stepDeliverCashToCurrencyPurchase(self, sequence=None, sequence_list=None, **kwd): def stepDeliverCashToCurrencyPurchase(self, sequence=None, sequence_list=None, **kwd):
""" """
Deliver the cash sorting with a good user Deliver the cash sorting with a good user
......
...@@ -303,7 +303,6 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -303,7 +303,6 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase):
""" """
confirm the monetary reception confirm the monetary reception
""" """
#import pdb; pdb.set_trace()
msg = self.assertWorkflowTransitionFails(self.checkbook_reception2, msg = self.assertWorkflowTransitionFails(self.checkbook_reception2,
'checkbook_reception_workflow', 'deliver_action') 'checkbook_reception_workflow', 'deliver_action')
self.failUnless(msg.find('The following references are already allocated') self.failUnless(msg.find('The following references are already allocated')
...@@ -322,7 +321,6 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -322,7 +321,6 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase):
""" """
confirm the monetary reception confirm the monetary reception
""" """
#import pdb; pdb.set_trace()
msg = self.assertWorkflowTransitionFails(self.checkbook_reception4, msg = self.assertWorkflowTransitionFails(self.checkbook_reception4,
'checkbook_reception_workflow', 'deliver_action') 'checkbook_reception_workflow', 'deliver_action')
self.failUnless(msg.find('The following references are already allocated') self.failUnless(msg.find('The following references are already allocated')
...@@ -399,7 +397,7 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -399,7 +397,7 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase):
+ 'ConfirmCheckbookReception3 Tic ' \ + 'ConfirmCheckbookReception3 Tic ' \
+ 'CreateCheckAndCheckbookLineList4 Tic ' \ + 'CreateCheckAndCheckbookLineList4 Tic ' \
+ 'ConfirmCheckbookReception4 Tic ' \ + 'ConfirmCheckbookReception4 Tic ' \
+ 'DeliverCheckbookReception3 ' \ + 'DeliverCheckbookReception3 Tic ' \
+ 'DeliverCheckbookReception4Fails ' + 'DeliverCheckbookReception4Fails '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
......
...@@ -77,6 +77,8 @@ class TestERP5BankingCheckbookVaultTransferMixin: ...@@ -77,6 +77,8 @@ class TestERP5BankingCheckbookVaultTransferMixin:
wf_id='checkbook_reception_workflow') wf_id='checkbook_reception_workflow')
self.workflow_tool.doActionFor(self.checkbook_reception, 'deliver_action', self.workflow_tool.doActionFor(self.checkbook_reception, 'deliver_action',
wf_id='checkbook_reception_workflow') wf_id='checkbook_reception_workflow')
get_transaction().commit()
self.tic()
def createCheckbookReceptionWithTravelerCheck(self, sequence=None, def createCheckbookReceptionWithTravelerCheck(self, sequence=None,
sequence_list=None, **kwd): sequence_list=None, **kwd):
......
...@@ -240,7 +240,7 @@ class TestERP5BankingMoneyDepositMixin: ...@@ -240,7 +240,7 @@ class TestERP5BankingMoneyDepositMixin:
self.assertEqual(self.money_deposit.getSimulationState(), 'confirmed') self.assertEqual(self.money_deposit.getSimulationState(), 'confirmed')
self.assertEqual(self.money_deposit.getSourceTotalAssetPrice(), 20000.0) self.assertEqual(self.money_deposit.getSourceTotalAssetPrice(), 20000.0)
def stepSendToValidation(self, sequence=None, sequence_list=None, **kwd): def stepMoneyDepositSendToValidation(self, sequence=None, sequence_list=None, **kwd):
""" """
""" """
self.workflow_tool.doActionFor(self.money_deposit, 'order_action', wf_id='money_deposit_workflow') self.workflow_tool.doActionFor(self.money_deposit, 'order_action', wf_id='money_deposit_workflow')
...@@ -336,7 +336,7 @@ class TestERP5BankingMoneyDeposit(TestERP5BankingMoneyDepositMixin, ...@@ -336,7 +336,7 @@ class TestERP5BankingMoneyDeposit(TestERP5BankingMoneyDepositMixin,
# define the sequence # define the sequence
sequence_string = 'Tic CheckObjects Tic CheckInitialInventory ' \ sequence_string = 'Tic CheckObjects Tic CheckInitialInventory ' \
+ 'CreateMoneyDeposit Tic ' \ + 'CreateMoneyDeposit Tic ' \
+ 'SendToValidation Tic ' \ + 'MoneyDepositSendToValidation Tic ' \
+ 'MoneyDepositSendToCounter Tic ' \ + 'MoneyDepositSendToCounter Tic ' \
+ 'MoneyDepositInputCashDetails ' \ + 'MoneyDepositInputCashDetails ' \
+ 'CheckConfirmedInventory Tic ' \ + 'CheckConfirmedInventory 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