feat(saju-lab): /interpret 응답에 fortune_scores + lucky + monthly_flow 포함
This commit is contained in:
@@ -38,11 +38,10 @@ def test_health():
|
||||
|
||||
|
||||
def test_saju_interpret_endpoint(monkeypatch):
|
||||
"""saju interpret이 pipeline mock으로 동작."""
|
||||
"""saju interpret이 pipeline mock으로 동작 + 신규 필드 검증."""
|
||||
async def fake_interpret(*args, **kwargs):
|
||||
return _interpret_result()
|
||||
|
||||
# interpret_saju를 mock
|
||||
from app.routers import saju as saju_router
|
||||
monkeypatch.setattr(saju_router.pipeline, "interpret_saju", fake_interpret)
|
||||
|
||||
@@ -58,6 +57,16 @@ def test_saju_interpret_endpoint(monkeypatch):
|
||||
assert "daeun" in data
|
||||
assert "reading_id" in data
|
||||
assert data["reading_id"] > 0
|
||||
# 신규 필드
|
||||
assert "fortune_scores" in data
|
||||
for k in ("wealth", "romance", "social", "career", "overall"):
|
||||
assert k in data["fortune_scores"]
|
||||
assert 0 <= data["fortune_scores"][k] <= 100
|
||||
assert "lucky" in data
|
||||
for k in ("color", "number", "direction", "good_signs", "warnings"):
|
||||
assert k in data["lucky"]
|
||||
assert "monthly_flow" in data
|
||||
assert len(data["monthly_flow"]) == 12
|
||||
|
||||
|
||||
def test_saju_list_get_cycle(monkeypatch):
|
||||
|
||||
Reference in New Issue
Block a user