File tree Expand file tree Collapse file tree 5 files changed +18
-17
lines changed Expand file tree Collapse file tree 5 files changed +18
-17
lines changed Original file line number Diff line number Diff line change 1919import pytest
2020
2121import odoo
22- import odoo .tests
2322
2423
2524def pytest_addoption (parser ):
@@ -165,7 +164,7 @@ def load_registry():
165164 # since Odoo sets it when loading test suites.
166165 threading .current_thread ().testing = True
167166 with _worker_db_name () as db_name :
168- odoo .registry (db_name )
167+ odoo .modules . registry . Registry (db_name )
169168 yield
170169
171170
Original file line number Diff line number Diff line change 1- from mock import MagicMock
2- registry = MagicMock ()
1+ from . import tests
2+ from unittest .mock import MagicMock
3+ modules = MagicMock ()
34tools = MagicMock ()
Original file line number Diff line number Diff line change 1- from mock import MagicMock
1+ from unittest . mock import MagicMock
22common = MagicMock ()
Original file line number Diff line number Diff line change 1+ [build-system ]
2+ requires = [" hatchling" , " hatch-odoo" ]
3+ build-backend = " hatchling.build"
4+
5+ [project ]
6+ name = " odoo"
7+ version = " 0.1.0"
8+ description = " Fake odoo used in unitest to avoid testing against real odoo"
9+ dependencies = [
10+ ]
11+
12+ [tool .hatch .build ]
13+ packages = [" odoo" ]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments