<commit_before># @ 2018 Akretion - www.akretion.com.br -
#   <NAME> <<EMAIL>>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase


class TestPartnerFiscalType(TransactionCase):
    def test_create_other_default_type(self):
        default_type = self.env["l10n_br_fiscal.partner.profile"].search(
            [("default", "=", True)]
        )
        assert default_type, "The data of Partner Fiscal Type not loaded."
        with self.assertRaises(ValidationError):
            self.env["l10n_br_fiscal.partner.profile"].create(
                {"code": "TESTE", "default": True, "is_company": True}
            )<commit_msg>[FIX] tests<commit_after># @ 2018 Akretion - www.akretion.com.br -
#   <NAME> <<EMAIL>>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase


class TestPartnerFiscalProfile(TransactionCase):
    def test_create_other_default_type(self):
        default_type = self.env["l10n_br_fiscal.partner.profile"].search(
            [("default", "=", True)]
        )
        assert default_type, "The data of Partner Fiscal Type not loaded."
        with self.assertRaises(ValidationError):
            self.env["l10n_br_fiscal.partner.profile"].create(
                {"code": "TESTE", "default": True, "is_company": True}
            )
{'fraction_non_alphanumeric': 0.13034623217922606, 'fraction_numerical': 0.013577732518669382, 'mean_word_length': 3.1875, 'pattern_counts': {'":': 6, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '403801', 'n_tokens_mistral': 490, 'n_tokens_neox': 467, 'n_words': 93}