Skip to content

Commit

Permalink
[REF] moving tests files from l10n_br_account to l10n_br_fiscal
Browse files Browse the repository at this point in the history
  • Loading branch information
renatonlima committed Jul 14, 2019
1 parent 35ab084 commit c922209
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 64 deletions.
1 change: 1 addition & 0 deletions l10n_br_account/__init__.py
@@ -1,3 +1,4 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import models
#from . import wizards
Expand Down
14 changes: 7 additions & 7 deletions l10n_br_account/__manifest__.py
Expand Up @@ -24,13 +24,13 @@
'views/account_tax_view.xml',
'views/account_tax_template_view.xml',

#'security/ir.model.access.csv',
#'data/l10n_br_account_data.xml',
#'views/account_view.xml',
#'views/account_invoice_view.xml',
#'views/product_view.xml',
#'views/res_company_view.xml',
#'report/account_invoice_report_view.xml',
# 'security/ir.model.access.csv',
# 'data/l10n_br_account_data.xml',
# 'views/account_view.xml',
# 'views/account_invoice_view.xml',
# 'views/product_view.xml',
# 'views/res_company_view.xml',
# 'report/account_invoice_report_view.xml',
],
'demo': [
# 'demo/base_demo.xml'
Expand Down
21 changes: 11 additions & 10 deletions l10n_br_account/models/__init__.py
@@ -1,17 +1,18 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import account_tax_group
from . import account_tax_abstract
from . import account_tax_template
from . import account_tax
from . import fiscal_tax
from . import account_fiscal_position_abstract
from . import account_fiscal_position_template
from . import account_fiscal_position
from . import res_company
from . import account_journal
from . import account_invoice
from . import account_invoice_line
from . import product_template
from . import operation
from . import account_move_line
# from . import account_fiscal_position_abstract
# from . import account_fiscal_position_template
# from . import account_fiscal_position
# from . import res_company
# from . import account_journal
# from . import account_invoice
# from . import account_invoice_line
# from . import product_template
# from . import operation
# from . import account_move_line
# from . import wizard_multi_charts_accounts
10 changes: 4 additions & 6 deletions l10n_br_account/tests/__init__.py
@@ -1,7 +1,5 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import test_account_customer_invoice
from . import test_account_supplier_invoice
from . import test_generate_fiscal_rules
from . import test_fiscal_partner_type
from . import test_account_service_type
from . import test_account_cnae
# from . import test_account_customer_invoice
# from . import test_account_supplier_invoice
# from . import test_generate_fiscal_rules
17 changes: 0 additions & 17 deletions l10n_br_account/tests/test_account_cnae.py

This file was deleted.

17 changes: 0 additions & 17 deletions l10n_br_account/tests/test_account_service_type.py

This file was deleted.

1 change: 1 addition & 0 deletions l10n_br_fiscal/models/__init__.py
@@ -1,3 +1,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import data_abstract
from . import ibpt
Expand Down
4 changes: 4 additions & 0 deletions l10n_br_fiscal/tests/__init__.py
@@ -1,3 +1,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import test_cnae
from . import test_service_type
from . import test_partner_profile
from . import test_ibpt_product
from . import test_ibpt_service
16 changes: 16 additions & 0 deletions l10n_br_fiscal/tests/test_cnae.py
@@ -0,0 +1,16 @@
# @ 2018 Akretion - www.akretion.com.br -
# Magno Costa <magno.costa@akretion.com.br>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo.tests.common import TransactionCase


class TestCNAE(TransactionCase):
def test_name_get(self):
self.cnae = self.env['l10n_br_fiscal.cnae'].create({
'code': 'TESTE',
'name': 'TESTE',
'version': 'TESTE',
'internal_type': 'normal'})
assert(self.cnae.name_get(),
'Error with function name_get() of object l10n_br_account.cnae')
Expand Up @@ -6,15 +6,14 @@
from odoo.tests.common import TransactionCase


class TestAccountPartnerFiscalType(TransactionCase):
class TestPartnerFiscalType(TransactionCase):
def test_create_other_default_type(self):
default_type = self.env[
'l10n_br_account.partner.fiscal.type'].search([(
'l10n_br_fiscal.partner.profile'].search([(
'default', '=', True)])
assert default_type, 'The data of Partner Fiscal Type is not load.'
with self.assertRaises(ValidationError):
self.env['l10n_br_account.partner.fiscal.type'].create(dict(
code='TESTE',
default=True,
is_company=True,
))
self.env['l10n_br_fiscal.partner.profile'].create({
'code': 'TESTE',
'default': True,
'is_company': True})
16 changes: 16 additions & 0 deletions l10n_br_fiscal/tests/test_service_type.py
@@ -0,0 +1,16 @@
# @ 2018 Akretion - www.akretion.com.br -
# Magno Costa <magno.costa@akretion.com.br>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo.tests.common import TransactionCase


class TestServiceType(TransactionCase):
def test_name_get(self):
self.service_type = self.env['l10n_br_fiscal.service.type'].create({
'code': 'TESTE',
'name': 'TESTE',
'internal_type': 'normal'})
assert(self.service_type.name_get(),
'Error with function name_get() of object '
'l10n_br_fiscal.service.type')

0 comments on commit c922209

Please sign in to comment.