Skip to content

Commit

Permalink
Mock Odoo module for unit tests
Browse files Browse the repository at this point in the history
As Odoo is an heavy piece of software and we don't have to check it runs we can mock the import. For further unit tests, the few methods we use will have to be mocked too.
  • Loading branch information
yvaucher committed Oct 4, 2024
1 parent 8512da6 commit 0d1a586
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import sys
import types

sys.modules["odoo"] = types.ModuleType("odoo")
sys.modules["odoo.tests"] = types.ModuleType("odoo.tests")

0 comments on commit 0d1a586

Please sign in to comment.