Skip to content

Commit

Permalink
[FIX] mis_builder: ensure ci
Browse files Browse the repository at this point in the history
Some modules could insert data to the default company that could make
the tests checks fail. With this patch we ensure, at least for this test
cases to be performed with a brand new company.
  • Loading branch information
chienandalu committed Dec 13, 2024
1 parent 600380f commit 2e7a3a9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mis_builder/tests/test_data_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ def _create_move(self, date, amount, debit_acc, credit_acc):
move._post()
return move

@classmethod
def setUpClass(cls):
super().setUpClass()
# Perform the tests with a brand new company to avoid intrusive data from other
# modules added to the default company
cls.company = cls.env["res.company"].create({"name": "Company Test"})
cls.env.user.company_id = cls.company

def setUp(self):
super().setUp()
self.account_model = self.env["account.account"]
Expand Down

0 comments on commit 2e7a3a9

Please sign in to comment.