Skip to content

Commit

Permalink
Merge PR #1763 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by dreispt
  • Loading branch information
OCA-git-bot committed Nov 30, 2024
2 parents 30eec92 + 5baf68a commit 881a527
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def setUpClass(cls):
# Setup Fake Models
cls.loader = FakeModelLoader(cls.env, cls.__module__)
cls.loader.backup_registry()
cls.addClassCleanup(cls.loader.restore_registry)
from .models.order import ModelOrder, ModelOrderLine

cls.loader.update_registry(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def setUpClass(cls):
super().setUpClass()
cls.loader = FakeModelLoader(cls.env, cls.__module__)
cls.loader.backup_registry()
cls.addClassCleanup(cls.loader.restore_registry)
from .fake_models import (
ContainerDepositOrderLineTest,
ContainerDepositOrderTest,
Expand Down
6 changes: 1 addition & 5 deletions product_secondary_unit/tests/test_secondary_unit_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def setUpClass(cls):
super().setUpClass()
cls.loader = FakeModelLoader(cls.env, cls.__module__)
cls.loader.backup_registry()
cls.addClassCleanup(cls.loader.restore_registry)
from .models import SecondaryUnitFake

cls.loader.update_registry((SecondaryUnitFake,))
Expand Down Expand Up @@ -57,11 +58,6 @@ def setUpClass(cls):
}
)

@classmethod
def tearDownClass(cls):
cls.loader.restore_registry()
return super(TestProductSecondaryUnitMixin, cls).tearDownClass()

def test_product_secondary_unit_mixin(self):
fake_model = self.secondary_unit_fake

Expand Down
6 changes: 1 addition & 5 deletions product_set/tests/test_product_set_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def setUpClass(cls):
super().setUpClass()
cls.loader = FakeModelLoader(cls.env, cls.__module__)
cls.loader.backup_registry()
cls.addClassCleanup(cls.loader.restore_registry)
from .models import FakeProductSetWizard

cls.loader.update_registry((FakeProductSetWizard,))
Expand All @@ -26,11 +27,6 @@ def setUpClass(cls):
}
)

@classmethod
def tearDownClass(cls):
cls.loader.restore_registry()
return super().tearDownClass()

def test_product_set_wizard_compute_lines(self):
# Check if the wizard lines are updated when the product set changes
self.assertTrue(self.wizard.product_set_id, self.product_set_1)
Expand Down

0 comments on commit 881a527

Please sign in to comment.