From 243a7b04284349d29385eaa657cc593aafd8442e Mon Sep 17 00:00:00 2001 From: Nicholas Riegel Date: Sat, 30 May 2026 02:35:16 -0400 Subject: [PATCH] fix: move odoo_env fixture to root conftest.py conftest.py inside the addon directory causes pytest to import the package directly (bypassing the odoo.addons.* namespace), triggering an AssertionError in Odoo's metaclass. Moving the fixture to the repo-root conftest.py avoids the import path issue. Co-Authored-By: Claude Sonnet 4.6 --- addons/itsulu_blog_publisher/tests/conftest.py | 7 ------- conftest.py | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 addons/itsulu_blog_publisher/tests/conftest.py diff --git a/addons/itsulu_blog_publisher/tests/conftest.py b/addons/itsulu_blog_publisher/tests/conftest.py deleted file mode 100644 index 5485c34..0000000 --- a/addons/itsulu_blog_publisher/tests/conftest.py +++ /dev/null @@ -1,7 +0,0 @@ -import pytest - - -@pytest.fixture -def odoo_env(env): - """Re-export pytest-odoo's env fixture for use in pytest-bdd step definitions.""" - return env diff --git a/conftest.py b/conftest.py index d105862..9d18efc 100644 --- a/conftest.py +++ b/conftest.py @@ -4,6 +4,13 @@ Installs the addon into the test database before any test code runs. """ import subprocess import sys +import pytest + + +@pytest.fixture +def odoo_env(env): + """Re-export pytest-odoo's env fixture for use in pytest-bdd step definitions.""" + return env print(">>> conftest.py loaded", file=sys.stderr)