From 9b3c17fcb221f2c2264c7657b28f99ddeeed61a4 Mon Sep 17 00:00:00 2001 From: hbyang Date: Wed, 7 Oct 2026 14:31:55 +0900 Subject: [PATCH] =?UTF-8?q?test:=20=ED=96=89=EC=82=AC=20=EC=88=98=EC=A7=91?= =?UTF-8?q?=EC=9D=B4=20=EC=8A=A4=EC=BC=80=EC=A4=84=EB=9F=AC=EB=A1=9C=20?= =?UTF-8?q?=EC=98=AE=EA=B2=A8=20=EA=B0=84=20=EB=92=A4=20=EC=9B=8C=EC=B9=98?= =?UTF-8?q?=20=EC=9A=94=EC=95=BD=20=ED=85=8C=EC=8A=A4=ED=8A=B8=EB=8F=84=20?= =?UTF-8?q?=EB=A8=BC=EC=A0=80=20=EB=AA=A8=EC=95=84=20=EB=91=90=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- backend/tests/test_watch.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/tests/test_watch.py b/backend/tests/test_watch.py index 0f51b5b..9c9ab0a 100644 --- a/backend/tests/test_watch.py +++ b/backend/tests/test_watch.py @@ -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"]] == ["열리는 축제", "내일 축제"]