mirror of
https://gitlab.com/itsulu-odoo/itsulu-blog-publisher.git
synced 2026-05-30 23:41:23 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
parent
d1346642be
commit
5f183498f1
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue