Commit 3df9705d authored by Vincent Pelletier's avatar Vincent Pelletier

Fix portal_type passed to getTotalPrice to make function call work when fast is set to 0.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18486 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent edcc57d0
...@@ -442,7 +442,7 @@ class TestERP5BankingCheckPaymentMixin: ...@@ -442,7 +442,7 @@ class TestERP5BankingCheckPaymentMixin:
FIXME: check if the transition fails when a category or property is invalid. FIXME: check if the transition fails when a category or property is invalid.
""" """
self.assertEqual(self.check_payment.getSourceTotalAssetPrice(), self.assertEqual(self.check_payment.getSourceTotalAssetPrice(),
self.check_payment.getTotalPrice(fast=0, portal_type = 'Cash Delivery Cell')) self.check_payment.getTotalPrice(fast=0, portal_type = ['Cash Delivery Line', 'Cash Delivery Cell']))
self.workflow_tool.doActionFor(self.check_payment, 'deliver_action', wf_id='check_payment_workflow') self.workflow_tool.doActionFor(self.check_payment, 'deliver_action', wf_id='check_payment_workflow')
self.assertEqual(self.check_payment.getSimulationState(), 'delivered') self.assertEqual(self.check_payment.getSimulationState(), 'delivered')
......
...@@ -232,12 +232,12 @@ class TestERP5BankingInternalMoneyDeposit(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -232,12 +232,12 @@ class TestERP5BankingInternalMoneyDeposit(TestERP5BankingMixin, ERP5TypeTestCase
def stepDeliverInternalMoneyDeposit(self, sequence=None, sequence_list=None, **kwd): def stepDeliverInternalMoneyDeposit(self, sequence=None, sequence_list=None, **kwd):
self.assertEqual(self.internal_money_deposit.getSourceTotalAssetPrice(), self.assertEqual(self.internal_money_deposit.getSourceTotalAssetPrice(),
self.internal_money_deposit.getTotalPrice(fast=0, portal_type = 'Cash Delivery Cell')) self.internal_money_deposit.getTotalPrice(fast=0, portal_type = ['Cash Delivery Line', 'Cash Delivery Cell']))
self.workflow_tool.doActionFor(self.internal_money_deposit, 'deliver_action', wf_id='internal_money_deposit_workflow') self.workflow_tool.doActionFor(self.internal_money_deposit, 'deliver_action', wf_id='internal_money_deposit_workflow')
self.assertEqual(self.internal_money_deposit.getSimulationState(), 'delivered') self.assertEqual(self.internal_money_deposit.getSimulationState(), 'delivered')
self.assertEqual(self.internal_money_deposit.getSourceTotalAssetPrice(), 20000.0) self.assertEqual(self.internal_money_deposit.getSourceTotalAssetPrice(), 20000.0)
self.assertEqual(20000.0, self.internal_money_deposit.getTotalPrice(fast=0, portal_type = 'Cash Delivery Cell')) self.assertEqual(20000.0, self.internal_money_deposit.getTotalPrice(fast=0, portal_type = ['Cash Delivery Line', 'Cash Delivery Cell']))
def stepCheckFinalInventory(self, sequence=None, sequence_list=None, **kwd): def stepCheckFinalInventory(self, sequence=None, sequence_list=None, **kwd):
......
...@@ -282,14 +282,13 @@ class TestERP5BankingMoneyDepositMixin: ...@@ -282,14 +282,13 @@ class TestERP5BankingMoneyDepositMixin:
self.assertEqual(self.simulation_tool.getFutureInventory(payment=self.bank_account_1.getRelativeUrl()), 120000) self.assertEqual(self.simulation_tool.getFutureInventory(payment=self.bank_account_1.getRelativeUrl()), 120000)
def stepDeliverMoneyDeposit(self, sequence=None, sequence_list=None, **kwd): def stepDeliverMoneyDeposit(self, sequence=None, sequence_list=None, **kwd):
self.assertEqual(self.money_deposit.getSourceTotalAssetPrice(), self.assertEqual(self.money_deposit.getSourceTotalAssetPrice(),
self.money_deposit.getTotalPrice(fast=0, portal_type = 'Cash Delivery Cell')) self.money_deposit.getTotalPrice(fast=0, portal_type = ['Cash Delivery Line', 'Cash Delivery Cell']))
self.workflow_tool.doActionFor(self.money_deposit, 'deliver_action', wf_id='money_deposit_workflow') self.workflow_tool.doActionFor(self.money_deposit, 'deliver_action', wf_id='money_deposit_workflow')
self.assertEqual(self.money_deposit.getSimulationState(), 'delivered') self.assertEqual(self.money_deposit.getSimulationState(), 'delivered')
self.assertEqual(self.money_deposit.getSourceTotalAssetPrice(), 20000.0) self.assertEqual(self.money_deposit.getSourceTotalAssetPrice(), 20000.0)
self.assertEqual(20000.0, self.money_deposit.getTotalPrice(fast=0, portal_type = 'Cash Delivery Cell')) self.assertEqual(20000.0, self.money_deposit.getTotalPrice(fast=0, portal_type = ['Cash Delivery Line', 'Cash Delivery Cell']))
def stepCheckFinalInventory(self, sequence=None, sequence_list=None, **kwd): def stepCheckFinalInventory(self, sequence=None, sequence_list=None, **kwd):
""" """
......
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