test: 행사 수집이 스케줄러로 옮겨 간 뒤 워치 요약 테스트도 먼저 모아 두기
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f6ec296130
commit
9b3c17fcb2
1 file changed
+3
@@ -47,6 +47,8 @@ def test_timeline_skips_weak_tomorrow_or_finished_sunset():
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_watch_summary_bundles_now_top_picks_sunset(offline):
|
||||
# 행사는 스케줄러가 7일마다 모아 둔다. 요청은 DB 만 읽으니 먼저 모아 둔다
|
||||
await week_service.collect_events("11", now_kst().date())
|
||||
async with AsyncClient(transport=ASGITransport(app=app), base_url="http://test") as client:
|
||||
body = (await client.get("/v1/watch/summary", params={"region": REGION, "pick": "laundry, nope,running,carwash,bike"})).json()
|
||||
assert body["result"]["success"] is True
|
||||
@@ -70,6 +72,7 @@ async def test_watch_summary_puts_live_event_first_without_bracket_prefix(offlin
|
||||
{"contentid": "1", "title": "내일 축제", "addr1": "서울", "eventstartdate": day(1), "eventenddate": day(2)},
|
||||
{"contentid": "2", "title": "[주최] 열리는 축제", "addr1": "서울", "eventstartdate": day(-3), "eventenddate": day(2)},
|
||||
] if sido == "11" else []))
|
||||
await week_service.collect_events("11", today)
|
||||
async with AsyncClient(transport=ASGITransport(app=app), base_url="http://test") as client:
|
||||
body = (await client.get("/v1/watch/summary", params={"region": REGION})).json()
|
||||
assert [e["name"] for e in body["events"]] == ["열리는 축제", "내일 축제"]
|
||||
|
||||
Reference in new issue
Block a user