feat: Complete code integration of modules (#18)
The complete code integration is done. Co-authored-by: Sagnik <sagnik7896@gmail.com> Reviewed-on: #18
This commit was merged in pull request #18.
This commit is contained in:
26
backend/tests/oracle/test_persona_service.py
Normal file
26
backend/tests/oracle/test_persona_service.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
from backend.oracle.persona_service import persona_service
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_persona_plan_recommends_templates_for_pipeline_prompt() -> None:
|
||||
plan = await persona_service.plan_for_prompt(
|
||||
prompt="Show me a pipeline map and broker trend view for marina whales",
|
||||
tenant_id="tenant_velocity",
|
||||
actor_role="sales_director",
|
||||
)
|
||||
assert "tpl_pipeline_board_v2" in plan["recommendedTemplates"]
|
||||
assert plan["canvasBlocks"][0]["type"] == "textCanvas"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_persona_render_uses_existing_prompt_files() -> None:
|
||||
rendered = await persona_service.render_prompt(
|
||||
prompt_name="qd_calculator",
|
||||
variables={"lead_name": "Amina", "query": "Summarize buyer intent"},
|
||||
)
|
||||
assert rendered["promptName"] == "qd_calculator"
|
||||
assert "Amina" in rendered["renderedPrompt"] or rendered["unresolvedVariables"] is not None
|
||||
Reference in New Issue
Block a user