fix: 처음 온 지역의 각이 비어 보이던 것 (예보 받는 동안 3초만 기다리고 빈 피드를 1분 저장하던 것)

This commit is contained in:
minaChoi committed 2026-10-13 17:02:41 +09:00
1 parent 92cfeabe19
commit 599ef05dcf
3 files changed
+6 -4

No files matched your search

+2 -3
View File
@@ -204,7 +204,7 @@ def test_gak_key_handles_sunset_window():
@pytest.mark.anyio
async def test_feed_missing_gak_is_cached_only_briefly(offline, monkeypatch):
async def test_feed_missing_gak_is_not_cached(offline, monkeypatch):
from common.cache.redis_client import REDIS
from common.enums import ErrorType
from services.index_service import IndexService
@@ -216,8 +216,7 @@ async def test_feed_missing_gak_is_cached_only_briefly(offline, monkeypatch):
async with AsyncClient(transport=ASGITransport(app=app), base_url="http://test") as client:
body = (await client.get("/v1/feed", params={"region": REGION})).json()
assert PostType.GAK.value not in [p["post_type"] for p in body["posts"]]
keys = [k async for k in REDIS.conn.scan_iter(f"feed:{REGION}:*")]
assert keys and 0 < await REDIS.conn.ttl(keys[0]) <= 60
assert [k async for k in REDIS.conn.scan_iter(f"feed:{REGION}:*")] == []
def _alert_ctx(warnings=(), rain_prob=0):