Skip to content

Commit

Permalink
[FIX] edi_party_data_oca: tests (workaround)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilshamerlinck authored and duongtq committed Oct 9, 2023
1 parent 755d6cb commit 49f63b5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions edi_party_data_oca/tests/test_party_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# @author: Simone Orsi <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo_test_helper import FakeModelLoader

from odoo.addons.edi_oca.tests.common import EDIBackendCommonComponentTestCase

from ..utils import get_party_data_component
Expand All @@ -11,6 +13,12 @@ class PartyDataTestCase(EDIBackendCommonComponentTestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()

# force reload of the registry that is impacted by edi_oca tests
cls.loader = FakeModelLoader(cls.env, cls.__module__)
cls.loader.backup_registry()
cls.loader.update_registry(())

cls.backend = cls.env.ref("edi_oca.demo_edi_backend")
cls.cat_model = cls.env["res.partner.id_category"]
cls.all_cat = cls.cat_model.browse()
Expand Down

0 comments on commit 49f63b5

Please sign in to comment.