refactor(products): remove usage notes and contraindications fields
This commit is contained in:
parent
9df241a6a9
commit
013492ec2b
16 changed files with 54 additions and 179 deletions
|
|
@ -9,7 +9,6 @@ from innercontext.api.products import (
|
|||
_build_inci_tool_handler,
|
||||
_build_safety_rules_tool_handler,
|
||||
_build_shopping_context,
|
||||
_build_usage_notes_tool_handler,
|
||||
_extract_requested_product_ids,
|
||||
)
|
||||
from innercontext.models import Product, ProductInventory, SkinConditionSnapshot
|
||||
|
|
@ -96,7 +95,6 @@ def test_suggest_shopping(client, session):
|
|||
assert "get_product_inci" in kwargs["function_handlers"]
|
||||
assert "get_product_safety_rules" in kwargs["function_handlers"]
|
||||
assert "get_product_actives" in kwargs["function_handlers"]
|
||||
assert "get_product_usage_notes" in kwargs["function_handlers"]
|
||||
|
||||
|
||||
def test_shopping_context_medication_skip(session: Session):
|
||||
|
|
@ -133,7 +131,6 @@ def test_shopping_tool_handlers_return_payloads(session: Session):
|
|||
category="serum",
|
||||
recommended_time="both",
|
||||
leave_on=True,
|
||||
usage_notes="Use AM and PM on clean skin.",
|
||||
inci=["Water", "Niacinamide"],
|
||||
actives=[{"name": "Niacinamide", "percent": 5, "functions": ["niacinamide"]}],
|
||||
context_rules={"safe_after_shaving": True},
|
||||
|
|
@ -148,8 +145,5 @@ def test_shopping_tool_handlers_return_payloads(session: Session):
|
|||
actives_data = _build_actives_tool_handler([product])(payload)
|
||||
assert actives_data["products"][0]["actives"][0]["name"] == "Niacinamide"
|
||||
|
||||
notes_data = _build_usage_notes_tool_handler([product])(payload)
|
||||
assert notes_data["products"][0]["usage_notes"] == "Use AM and PM on clean skin."
|
||||
|
||||
safety_data = _build_safety_rules_tool_handler([product])(payload)
|
||||
assert "context_rules" in safety_data["products"][0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue