Skip to content

Commit ca110a2

Browse files
committed
modernize mock/odoo using pyproject and fix odoo.tests import
1 parent 21fae9c commit ca110a2

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

tests/mock/odoo/odoo/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
from mock import MagicMock
1+
from . import tests
2+
from unittest.mock import MagicMock
23
registry = MagicMock()
34
tools = MagicMock()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
from mock import MagicMock
1+
from unittest.mock import MagicMock
22
common = MagicMock()

tests/mock/odoo/pyproject.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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"]

tests/mock/odoo/setup.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)