docs: thin phase 4 complete; refresh ORIENTATION + HANDOFF

This commit is contained in:
2026-05-06 06:36:36 -07:00
parent 07ddec792c
commit bd0e34d7e1
3 changed files with 48 additions and 13 deletions
+34
View File
@@ -0,0 +1,34 @@
"""End-to-end: ingredient + recipe + match all wired together."""
import pytest
pytestmark = pytest.mark.requires_postgres
def _admin() -> dict:
return {"Authorization": "Bearer test-admin-token"}
def test_seed_data_present_and_resolvable(client):
r = client.get("/api/recipes")
assert r.status_code == 200
recipes = r.json()
assert len(recipes) >= 30, f"expected >=30 seeded recipes, got {len(recipes)}"
def test_resolve_against_seeded_ingredients(client):
r = client.post(
"/api/admin/recipes/resolve-ingredient",
json={"text": "1 lb chicken thighs"},
headers=_admin(),
)
assert r.status_code == 200
candidates = r.json()["candidates"]
assert candidates, "expected at least one candidate"
assert "chicken" in candidates[0]["name"].lower()
def test_match_job_runs_against_seeded_data(db_session):
from app.services.matcher import run_match_job
written = run_match_job(db_session)
assert written >= 0