fix: 초단기예보가 닿는 시간은 비·비 없음 모두 초단기예보를 따르게 (단기예보에 남은 비로 '지금' 칸·우산각이 비로 나오던 것)
This commit is contained in:
1 parent
e28a2e297e
commit
012d8a4821
9 files changed
+86
-96
No files matched your search
@@ -4,7 +4,7 @@ from types import SimpleNamespace
|
||||
import pytest
|
||||
from httpx import ASGITransport, AsyncClient
|
||||
|
||||
import services.now_service as now_service
|
||||
import services.weather_service as weather_service
|
||||
import services.week_service as week_service
|
||||
from common.cache.redis_client import REDIS
|
||||
from common.utils.kma_time import KST, now_kst
|
||||
@@ -94,7 +94,7 @@ async def test_watch_summary_flags_thunder_within_2_hours(offline, monkeypatch):
|
||||
{"category": c, "fcstDate": (start + timedelta(hours=h)).strftime("%Y%m%d"), "fcstTime": (start + timedelta(hours=h)).strftime("%H%M"), "fcstValue": v}
|
||||
for h in range(1, 7) for c, v in [("PTY", "1"), ("RN1", "5.0mm"), ("T1H", "20"), ("LGT", "2" if h == 1 else "0")]
|
||||
]
|
||||
monkeypatch.setattr(now_service, "fetch_ultra", lambda *a: _async(items))
|
||||
monkeypatch.setattr(weather_service, "fetch_ultra", lambda *a: _async(items))
|
||||
# 앞 테스트가 받아 둔 초단기예보 캐시(비 없음)를 지워야 새 예보를 읽는다
|
||||
await REDIS.conn.delete(f"ultra:{REGION}", f"lock:ultra:{REGION}")
|
||||
async with AsyncClient(transport=ASGITransport(app=app), base_url="http://test") as client:
|
||||
|
||||
Reference in new issue
Block a user