itsulu-blog-publisher/addons/itsulu_blog_publisher/tests
Nicholas Riegel 2fd8d7fa3b fix: migrate email template to Odoo 17 syntax; fix BDD LLM mock JSON
PRODUCTION BUG: email template used pre-Odoo-14 Mako syntax (${} and
% for/% if), which Odoo 17 does not render — real notification emails
would show literal '${object.blog_post_id.name}' in the subject.
- subject/email_from: ${...} → {{ ... }} (inline_template engine)
- body_html: add type="qweb"; ${x} → <t t-out="x"/>;
  % for → <t t-foreach t-as>; % if → <t t-if>

BDD: when_llm_router_called mocked provider.generate() returning raw
HTML in .text, but LLMRouter._parse_response expects JSON and raised
UserError before ctx['mock_generate'] was set. Now returns valid JSON
with all required fields, and records the mock before generate() runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 02:57:10 -04:00
..
features feat: add BDD feature files for pytest-bdd scenarios 2026-05-30 00:39:41 -04:00
__init__.py Implement LLMRouter and provider infrastructure for GREEN phase tests 2026-05-29 12:27:58 -04:00
factories.py fix: use sudo() in blog_post factory to bypass validation 2026-05-29 23:25:17 -04:00
test_bdd_steps.py fix: migrate email template to Odoo 17 syntax; fix BDD LLM mock JSON 2026-05-30 02:57:10 -04:00
test_blog_generation_log.py Reorganize codebase into Odoo addon structure per ARCHITECTURE.md 2026-05-29 12:11:42 -04:00
test_blog_post_social.py fix: use _render_field() for template rendering; fix wizard import name 2026-05-30 02:53:57 -04:00
test_blog_schedule.py fix: replace cr.commit() with flush_all() for test compatibility and fix mock assertion 2026-05-30 00:19:29 -04:00
test_blog_topic.py test: fix test framework compatibility for ValidationError assertion 2026-05-29 23:12:32 -04:00
test_llm_router.py fix: update test_llm_router to use topic parameter and valid JSON mocks 2026-05-30 00:27:48 -04:00
test_performance.py fix: resolve 18 test failures across BDD, email, and performance tests 2026-05-30 02:33:48 -04:00