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
|
|
@ -13,7 +13,6 @@ from innercontext.api.routines import (
|
|||
_build_recent_history,
|
||||
_build_safety_rules_tool_handler,
|
||||
_build_skin_context,
|
||||
_build_usage_notes_tool_handler,
|
||||
_contains_minoxidil_text,
|
||||
_ev,
|
||||
_extract_active_names,
|
||||
|
|
@ -56,10 +55,6 @@ def test_is_minoxidil_product():
|
|||
assert _is_minoxidil_product(p) is True
|
||||
|
||||
p.line_name = None
|
||||
p.usage_notes = "Use minoxidil daily"
|
||||
assert _is_minoxidil_product(p) is True
|
||||
|
||||
p.usage_notes = None
|
||||
p.inci = ["water", "minoxidil"]
|
||||
assert _is_minoxidil_product(p) is True
|
||||
|
||||
|
|
@ -386,7 +381,6 @@ def test_additional_tool_handlers_return_product_payloads(session: Session):
|
|||
brand="Test",
|
||||
recommended_time="both",
|
||||
leave_on=True,
|
||||
usage_notes="Apply morning and evening.",
|
||||
actives=[{"name": "Niacinamide", "percent": 5, "functions": ["niacinamide"]}],
|
||||
context_rules={"safe_after_shaving": True},
|
||||
product_effect_profile={},
|
||||
|
|
@ -397,8 +391,5 @@ def test_additional_tool_handlers_return_product_payloads(session: Session):
|
|||
actives_out = _build_actives_tool_handler([p])(ids_payload)
|
||||
assert actives_out["products"][0]["actives"][0]["name"] == "Niacinamide"
|
||||
|
||||
notes_out = _build_usage_notes_tool_handler([p])(ids_payload)
|
||||
assert notes_out["products"][0]["usage_notes"] == "Apply morning and evening."
|
||||
|
||||
safety_out = _build_safety_rules_tool_handler([p])(ids_payload)
|
||||
assert "context_rules" in safety_out["products"][0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue