From 5f183498f1961f45966941e74e91f69ef3009618 Mon Sep 17 00:00:00 2001 From: Nicholas Riegel Date: Sat, 30 May 2026 00:38:53 -0400 Subject: [PATCH] fix: correct BDD step parameters and model field references Fixed router.generate() calls to use 'topic=' instead of 'prompt='. Fixed post.social_ids reference to use correct field name 'itsulu_social_id'. These corrections align with actual method signatures and model definitions. Co-Authored-By: Claude Haiku 4.5 --- addons/itsulu_blog_publisher/tests/test_bdd_steps.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/itsulu_blog_publisher/tests/test_bdd_steps.py b/addons/itsulu_blog_publisher/tests/test_bdd_steps.py index 51e945d..c7fd5c4 100644 --- a/addons/itsulu_blog_publisher/tests/test_bdd_steps.py +++ b/addons/itsulu_blog_publisher/tests/test_bdd_steps.py @@ -232,12 +232,12 @@ def when_llm_router_called(odoo_env, ctx): if patch_target: with patch(patch_target, return_value=mock_resp) as mock_gen: router = LLMRouter(odoo_env, provider=provider, model=ctx.get('model', '')) - result = router.generate(prompt='Write a blog post') + result = router.generate(topic='Write a blog post') ctx['result'] = result ctx['mock_generate'] = mock_gen else: router = LLMRouter(odoo_env, provider=provider, model=ctx.get('model', '')) - ctx['result'] = router.generate(prompt='Write a blog post') + ctx['result'] = router.generate(topic='Write a blog post') ctx['error'] = None except Exception as exc: ctx['result'] = None @@ -381,8 +381,8 @@ def then_email_contains_title(odoo_env, ctx): def then_email_contains_social_copy(odoo_env, ctx): mail = odoo_env['mail.mail'].search([], order='id desc', limit=1) post = ctx.get('post') - if post and post.social_ids: - social = post.social_ids[0] + if post and post.itsulu_social_id: + social = post.itsulu_social_id[0] body = mail.body_html or '' # Verify at least one social platform is mentioned platforms_found = 0