From a80a5c226a0407396dd3e6e598e94696867bb3b0 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Tue, 17 Nov 2009 13:49:04 +0000 Subject: [PATCH] Use createBankAccount to create organisation bank account. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30689 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Banking/tests/TestERP5BankingMixin.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/product/ERP5Banking/tests/TestERP5BankingMixin.py b/product/ERP5Banking/tests/TestERP5BankingMixin.py index 41408e4d69..a2c165e935 100644 --- a/product/ERP5Banking/tests/TestERP5BankingMixin.py +++ b/product/ERP5Banking/tests/TestERP5BankingMixin.py @@ -582,15 +582,17 @@ class TestERP5BankingMixin(ERP5TypeTestCase): function='banking') site_reference = site_reference_from_codification_dict.get(codification) if site_reference is not None: - bank_account = organisation.newContent( - portal_type='Bank Account', + self.createBankAccount( + person=organisation, + account_id='account_%s' % (codification, ), + currency=self.currency_1, + amount=0, bank_country_code=site_reference[0], bank_code=site_reference[1], branch=site_reference[2], bank_account_number=site_reference[3], - bank_account_key=site_reference[4], # XXX: Should be computed from other parts of site_reference + bank_account_key=site_reference[4], ) - bank_account.validate() self.vault_type_base_category = getattr(self.category_tool, 'vault_type') site_vault_type = self.vault_type_base_category.newContent(id='site') -- 2.30.9