"""463 B05 · B06 한 페이지 — 상세 갈아끼움 알림(요구 271-5 · 분석 4장 (C)). ① R1 — 강제 다시 받기(넓힘 재생성) = 듣는 쪽(B05 종단 보기) 한 번 · 새 상세 · 옛 코드 = 0 번(B05 옛 객체 쥠) ② R2 — [측점 만들기] 뒤 = 캐시 비우고 강제로 받음 · 듣는 쪽 한 번 · 다시 그림이 새 측점 · 옛 코드 = 옛 캐시 TS 셈은 `helper_271_detail_notify.cjs`. ./venv/Scripts/python.exe -m pytest resources/tester/test_271_detail_notify.py -q """ import json import subprocess from pathlib import Path import pytest ROOT = Path(__file__).resolve().parents[2] HELPER = Path(__file__).with_name("helper_271_detail_notify.cjs") pytestmark = pytest.mark.skipif( not (ROOT / "config" / "node_modules" / "typescript").is_dir(), reason="프론트엔드 의존성 미설치", ) @pytest.fixture(scope="module") def got() -> dict: run = subprocess.run( # noqa: S603 — 고정 실행 파일 ["node", str(HELPER)], capture_output=True, text=True, encoding="utf-8", timeout=120, ) assert run.returncode == 0, run.stderr return json.loads(run.stdout) def test_R1_강제_다시_받기는_듣는_쪽_한_번(got): assert got["r1"] == { "newObject": True, "listenerCalls": 1, "listenerGotFresh": True, "cacheIsFresh": True, } def test_R2_측점_만들기_뒤_새_상세(got): r2 = got["r2"] assert r2["posted"] == 1 assert r2["fetchesAfter"] == 1 # 강제로 한 번 · 다시 그림은 그 캐시 assert r2["listenerCalls"] == 1 assert r2["listenerStations"] == [0, 20, 33.5, 40] assert r2["redrawn"] == [[0, 20, 33.5, 40]]