Browse Source

Merge pull request #82 from StefanRijnhart/9.0-camt_test_data

[RFR] Create demo data during the execution of tests
pull/97/head
Pedro M. Baeza 8 years ago
committed by GitHub
parent
commit
0265044bfa
  1. 3
      account_bank_statement_import_camt/__openerp__.py
  2. 15
      account_bank_statement_import_camt/demo/demo_data.xml
  3. 15
      account_bank_statement_import_camt/tests/test_import_bank_statement.py

3
account_bank_statement_import_camt/__openerp__.py

@ -11,9 +11,6 @@
'depends': [
'account_bank_statement_import',
],
'demo': [
'demo/demo_data.xml',
],
'data': [
'views/account_bank_statement_import.xml',
],

15
account_bank_statement_import_camt/demo/demo_data.xml

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="camt_company_bank" model="res.partner.bank">
<field name="acc_number">NL77ABNA0574908765</field>
<field name="partner_id" ref="base.main_partner"></field>
<field name="company_id" ref="base.main_company"></field>
<field name="bank_id" ref="base.res_bank_1"/>
</record>
<record id="camt_bank_journal" model="account.journal">
<field name="name">Bank Journal - (test camt)</field>
<field name="code">TBNKCAMT</field>
<field name="type">bank</field>
<field name="bank_account_id" ref="camt_company_bank" />
</record>
</odoo>

15
account_bank_statement_import_camt/tests/test_import_bank_statement.py

@ -18,6 +18,21 @@ class TestImport(TransactionCase):
},
]
def setUp(self):
super(TestImport, self).setUp()
bank = self.env['res.partner.bank'].create({
'acc_number': 'NL77ABNA0574908765',
'partner_id': self.env.ref('base.main_partner').id,
'company_id': self.env.ref('base.main_company').id,
'bank_id': self.env.ref('base.res_bank_1').id,
})
self.env['account.journal'].create({
'name': 'Bank Journal - (test camt)',
'code': 'TBNKCAMT',
'type': 'bank',
'bank_account_id': bank.id,
})
def test_statement_import(self):
"""Test correct creation of single statement."""
action = {}

Loading…
Cancel
Save