[IMP] stock_archive_constraint: Tests more resilient when other modules have been installed

This commit is contained in:
sergio-teruel
2022-12-01 13:01:26 +01:00
committed by Carlos Lopez
parent 7df982f365
commit ec2fd46762
6 changed files with 58 additions and 26 deletions

View File

@@ -9,6 +9,9 @@ class TestLocationArchiveConstraint(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(
context=dict(cls.env.context, test_stock_archive_constraint=True)
)
cls.company = cls.env.ref("base.main_company")
cls.product_1 = cls._create_product(cls, "Product 1")
cls.product_2 = cls._create_product(cls, "Product 2")