Commit graph

5 commits

Author SHA1 Message Date
b4d5502d9f fix: use request.getfixturevalue for odoo_env and list API for generate_email
- odoo_env fixture: use request.getfixturevalue('env') instead of
  direct env parameter injection — pytest-bdd cannot inject pytest-odoo
  fixtures by name into conftest fixtures; getfixturevalue() bypasses
  this limitation
- generate_email: use list-based API generate_email([res_id]) returning
  {res_id: {field: value}} — Odoo 17 does not accept a bare int

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 02:43:27 -04:00
243a7b0428 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 <noreply@anthropic.com>
2026-05-30 02:35:16 -04:00
421f65cda6 fix: auto-install addon via conftest for pytest-odoo
Creates conftest.py that installs the addon before tests run via the
pytest_configure hook. Also fixes Dockerfile symlink path for Odoo 17
(no version subdirectory).
2026-05-29 22:45:54 -04:00
882e948679 test: remove conftest addon installation fixture 2026-05-29 22:25:05 -04:00
ab2918d031 test: add conftest to auto-install addon for pytest-odoo
Create a session-scoped fixture that installs itsulu_blog_publisher and its
dependencies before test execution. This ensures the Odoo registry knows about
our models when tests run.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-29 22:22:56 -04:00