test(768-4): 검증 프로젝트 다시 만든 뒤 시험 상수 새 id 로 · 기슭막이 없는 검증_sub2 벽 시험 건너뜀
- 시험 20 파일의 옛 프로젝트 id → 같은 이름 새 id(B 검증_sub1~8 · D 가이드_예정노선 · 검증_sub1_D · E 가이드_안정성평가) - test_536_3 벽 시험 둘 — 새 검증_sub2 = 구조물 0(옛 사용자 기슭막이 351 m 없음) · 벽 측점 없으면 건너뜀 - 고정 자료 golden_472 · helper_472_1_dump 는 옛 id 그대로(살아 있는 프로젝트 안 읽음) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -311,7 +311,7 @@ def test_GET_PUT_범위_밖_400(project: Path, monkeypatch: pytest.MonkeyPatch)
|
||||
app = FastAPI()
|
||||
app.include_router(scale_router.router)
|
||||
client = TestClient(app)
|
||||
url = "/api/projects/9872e9a7-e483-427b-a6b2-72cdbc063bc3/drawing-scales"
|
||||
url = "/api/projects/5db2e831-5940-41e4-8db3-4989439474a7/drawing-scales"
|
||||
got = client.get(url).json()
|
||||
assert got["scales"] == DRAWING_SCALE_DEFAULTS
|
||||
assert got["ranges"]["cross"]["x"] == [10, 1000]
|
||||
|
||||
@@ -210,7 +210,7 @@ def test_서버_단계_완료(monkeypatch, tmp_path: Path) -> None:
|
||||
monkeypatch.setattr(
|
||||
router, "get_db_pool", lambda: type("P", (), {"acquire": lambda self: _Acquire()})()
|
||||
)
|
||||
project = UUID("8b98ca75-c572-4002-8468-2adae4323414")
|
||||
project = UUID("a67588be-6715-4823-90fb-ab0946666130")
|
||||
result = asyncio.run(router.complete_design_stage(project))
|
||||
assert result == {"status": "success", "project_id": str(project)}
|
||||
assert stages == [(str(project), 4, "next")] # 298-2 [>] = 4 완료 · 5 진행 중
|
||||
|
||||
@@ -18,7 +18,7 @@ from common_util.common_util_auth import require_company
|
||||
from D03_PlanAnalysis import D03_PlanAnalysis_Network as net
|
||||
from D03_PlanAnalysis import D03_PlanAnalysis_Store as store
|
||||
|
||||
PID = "12953f5a-5ba1-42ad-a427-8ac857a58bc2"
|
||||
PID = "047b41bf-9bff-429a-a2de-f1c294250732"
|
||||
MAIN = [[0.0, 0.0], [30.0, 40.0], [30.0, 100.0], [90.0, 180.0]] # 50 + 60 + 100 = 210 m
|
||||
BRANCH = [[30.0, 100.0], [30.0, 150.0]] # 본선 점 2 에서 50 m
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ from fastapi.testclient import TestClient
|
||||
|
||||
from D03_PlanAnalysis import D03_PlanAnalysis_Router as router_mod
|
||||
|
||||
PID = "12953f5a-5ba1-42ad-a427-8ac857a58bc2"
|
||||
PID = "047b41bf-9bff-429a-a2de-f1c294250732"
|
||||
P0, P2 = (0.0, 0.0), (900.0, 400.0)
|
||||
URL = f"/api/projects/{PID}/plan/terrain"
|
||||
OX, OY = 200000.0, 500000.0 # 595 시험 = 중부 띠 안(경도 127°)
|
||||
|
||||
@@ -29,7 +29,7 @@ from config.config_db import DB_HOST, DB_NAME, DB_PASSWORD, DB_PORT, DB_USER #
|
||||
from E01_StabRegister import E01_StabRegister_Source as src # noqa: E402
|
||||
|
||||
#: 검증_sub1 — B06 까지 설계된 임도(읽기만)
|
||||
SOURCE_ID = "916ea58c-0e35-4982-bf55-d8558eeb78b5"
|
||||
SOURCE_ID = "7a20fd27-6070-4572-8efe-d4d6ff97948a"
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ from E03_StabSection.E03_StabSection_Engine_Model import ( # noqa: E402
|
||||
)
|
||||
from E03_StabSection.E03_StabSection_Engine_Station import analyze_station # noqa: E402
|
||||
|
||||
SUB4 = ROOT / "storage/1/3/c725d747-50ae-46b0-87ce-4d4e56a53cf3/initial_snapshot"
|
||||
SUB4 = ROOT / "storage/1/3/b5cf922b-2eaf-44b1-9e28-da78b4c92d00/initial_snapshot"
|
||||
|
||||
# 오른쪽(−) 산 · 왼쪽(+) 골 · 편절편성: 노면 −2~2 · 우 절토 1:0.5 · 좌 성토 1:1.5
|
||||
GROUND = [(x / 2, 10.0 - 0.6 * (x / 2)) for x in range(-40, 41)] # 10 − 0.6x (좌로 내려감)
|
||||
|
||||
@@ -254,7 +254,7 @@ def project(tmp_path, monkeypatch):
|
||||
return tmp_path
|
||||
|
||||
|
||||
PID = "9872e9a7-e483-427b-a6b2-72cdbc063bc3"
|
||||
PID = "5db2e831-5940-41e4-8db3-4989439474a7"
|
||||
SESSION = {"role": "USER", "company_id": 1}
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ from E03_StabSection import E03_StabSection_Worker as worker # noqa: E402
|
||||
from E03_StabSection.E03_StabSection_Engine_Model import section_model_from_b06 # noqa: E402
|
||||
from E03_StabSection.E03_StabSection_Engine_Station import analyze_station # noqa: E402
|
||||
|
||||
SOURCE_ID = "cb15892a-5788-4a26-9316-20a15421f68b" # 검증_sub2(읽기만)
|
||||
SOURCE_ID = "4128398b-b22f-4171-a931-44c3afdc11c2" # 검증_sub2(읽기만)
|
||||
PID = "e" * 8 + "-" + "e" * 4 + "-" + "e" * 4 + "-" + "e" * 4 + "-" + "e" * 12
|
||||
N_STATIONS = 3
|
||||
TYPESCRIPT = ROOT / "config" / "node_modules" / "typescript"
|
||||
|
||||
@@ -284,7 +284,7 @@ def project(tmp_path, monkeypatch):
|
||||
|
||||
|
||||
def test_지하수_저장_초기화_옛정본(project):
|
||||
pid = UUID("9872e9a7-e483-427b-a6b2-72cdbc063bc3")
|
||||
pid = UUID("5db2e831-5940-41e4-8db3-4989439474a7")
|
||||
session = {"role": "USER", "company_id": 1}
|
||||
first = asyncio.run(router.get_ground(pid, session))
|
||||
ground = copy.deepcopy(first["ground"])
|
||||
|
||||
@@ -38,7 +38,7 @@ from E03_StabSection import E03_StabSection_View as view # noqa: E402
|
||||
from E03_StabSection import E03_StabSection_Worker as worker # noqa: E402
|
||||
from E03_StabSection.E03_StabSection_Engine_Station import analyze_station # noqa: E402
|
||||
|
||||
SOURCE_ID = "cb15892a-5788-4a26-9316-20a15421f68b" # 검증_sub2(읽기만)
|
||||
SOURCE_ID = "4128398b-b22f-4171-a931-44c3afdc11c2" # 검증_sub2(읽기만)
|
||||
PID = "e" * 8 + "-" + "e" * 4 + "-" + "e" * 4 + "-" + "e" * 4 + "-" + "e" * 12
|
||||
WALL_KEY = "351.00" # 검증_sub2 기슭막이 측점
|
||||
CORNER_M = 0.2 # 임계면이 벽 모서리를 스치는 길이 한도(test_532_4 와 같음)
|
||||
|
||||
@@ -44,7 +44,7 @@ from E03_StabSection import E03_StabSection_WallCheck as wc # noqa: E402
|
||||
from E03_StabSection import E03_StabSection_WhatIf as whatif # noqa: E402
|
||||
from E03_StabSection.E03_StabSection_Engine_Station import analyze_station # noqa: E402
|
||||
|
||||
SOURCE_ID = "cb15892a-5788-4a26-9316-20a15421f68b" # 검증_sub2(읽기만)
|
||||
SOURCE_ID = "4128398b-b22f-4171-a931-44c3afdc11c2" # 검증_sub2(읽기만)
|
||||
PID = "e" * 8 + "-" + "e" * 4 + "-" + "e" * 4 + "-" + "e" * 4 + "-" + "e" * 12
|
||||
WALL_KEY = "351.00" # 검증_sub2 기슭막이 측점
|
||||
SOIL = {"gamma_t": 18.0, "gamma_sat": 19.0, "c": 0.0, "phi": 30.0}
|
||||
@@ -300,7 +300,15 @@ def test_최소_완화가_목표를_맞춤_원본_불변(project):
|
||||
assert again["computed_at"] == rec["computed_at"] # 같은 가정 = 저장본
|
||||
|
||||
|
||||
def _need_wall(root: Path) -> None:
|
||||
"""벽 측점이 원본에 없으면 건너뜀 — 768 새로 만든 검증_sub2 = 구조물 0(기슭막이 없음)."""
|
||||
summary, _ = router._latest_summary(root, "")
|
||||
if not any(r["key"] == WALL_KEY for r in summary["stations"]):
|
||||
pytest.skip(f"검증_sub2 에 기슭막이 측점 {WALL_KEY} 없음")
|
||||
|
||||
|
||||
def test_벽_측점_외적_안정_벽쪽_가정_거절(project):
|
||||
_need_wall(project)
|
||||
rec = wf.run_wallcheck(project, WALL_KEY, wf.WallRequest(kh=0.15))
|
||||
assert len(rec["walls"]) == 1
|
||||
wall = rec["walls"][0]
|
||||
@@ -317,6 +325,7 @@ def test_벽_측점_외적_안정_벽쪽_가정_거절(project):
|
||||
def test_E05_보강검토_시트(project, monkeypatch):
|
||||
from E05_StabReport import E05_StabReport_Build as build
|
||||
|
||||
_need_wall(project)
|
||||
recs = wf.records(project)
|
||||
assert {r["type"] for r in recs} == {"slope", "wall"}
|
||||
book = build.form()
|
||||
|
||||
@@ -39,7 +39,7 @@ from E03_StabSection import E03_StabSection_View as view # noqa: E402
|
||||
from E03_StabSection import E03_StabSection_Worker as worker # noqa: E402
|
||||
from E03_StabSection.E03_StabSection_Engine_Station import analyze_station # noqa: E402
|
||||
|
||||
SOURCE_ID = "c725d747-50ae-46b0-87ce-4d4e56a53cf3" # 검증_sub4(읽기만)
|
||||
SOURCE_ID = "b5cf922b-2eaf-44b1-9e28-da78b4c92d00" # 검증_sub4(읽기만)
|
||||
PID = "d" * 8 + "-" + "d" * 4 + "-" + "d" * 4 + "-" + "d" * 4 + "-" + "d" * 12
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ from E02_StabGround import E02_StabGround_Router as router # noqa: E402
|
||||
from E04_Stab3D import E04_Stab3D_Router as e04 # noqa: E402
|
||||
from E04_Stab3D import E04_Stab3D_Run as run3d # noqa: E402
|
||||
|
||||
PID = UUID("9872e9a7-e483-427b-a6b2-72cdbc063bc3")
|
||||
PID = UUID("5db2e831-5940-41e4-8db3-4989439474a7")
|
||||
KEYS = [k for k, _, _ in chain.STEPS]
|
||||
TOTAL = sum(w for _, _, w in chain.STEPS)
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ from common_util.common_util_storage import resolve_stored_project_path # noqa:
|
||||
from config.config_db import DB_HOST, DB_NAME, DB_PASSWORD, DB_PORT, DB_USER # noqa: E402
|
||||
|
||||
#: 가이드 예정노선 · 가이드 안정성평가(읽기만)
|
||||
PLAN_ID = "87d47800-9936-4a56-9850-276fbcb34cac"
|
||||
STAB_ID = "088e173d-a8ab-4c51-badb-f5a95afc43bb"
|
||||
PLAN_ID = "819dc193-ccbd-4e21-a1f6-8b11811bac33"
|
||||
STAB_ID = "6d5e517a-830a-43f0-954e-64871834c2cf"
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
#: 복제 안 뜨는 옛 D 표 — 지움 SQL 025 적용 전까지 남음(설계 내용 = 폴더 파일)
|
||||
RETIRED = {"plan_networks", "plan_route_pieces"}
|
||||
|
||||
@@ -27,7 +27,7 @@ from D03_PlanAnalysis import D03_PlanAnalysis_Network as net # noqa: E402
|
||||
from D03_PlanAnalysis import D03_PlanAnalysis_Store as store # noqa: E402
|
||||
from D04_PlanConfirm import D04_PlanConfirm_Router as d04 # noqa: E402
|
||||
|
||||
PID = "12953f5a-5ba1-42ad-a427-8ac857a58bc2"
|
||||
PID = "047b41bf-9bff-429a-a2de-f1c294250732"
|
||||
A = {"x": 210000.0, "y": 380000.0}
|
||||
B = {"x": 210300.0, "y": 380400.0}
|
||||
NETWORK = {
|
||||
|
||||
@@ -30,7 +30,7 @@ from D03_PlanAnalysis import D03_PlanAnalysis_Network as net
|
||||
from D03_PlanAnalysis import D03_PlanAnalysis_Store as store
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
PID = "12953f5a-5ba1-42ad-a427-8ac857a58bc2"
|
||||
PID = "047b41bf-9bff-429a-a2de-f1c294250732"
|
||||
URL = f"/api/projects/{PID}/plan/network"
|
||||
SITE = {"lon": 127.11, "lat": 37.505, "address": "경기도 어딘가 산 1"}
|
||||
A, B = lonlat_to_tm(127.10, 37.50, 5186), lonlat_to_tm(127.12, 37.51, 5186)
|
||||
|
||||
@@ -245,7 +245,7 @@ def test_wms_key_missing_404_and_key_not_leaked(tmp_path, monkeypatch, caplog):
|
||||
app = FastAPI()
|
||||
app.include_router(router)
|
||||
client = TestClient(app)
|
||||
pid = "ce266c60-ab1f-416b-92f2-f37d1bf539d8"
|
||||
pid = "4d3c385d-c9b5-4293-841a-82cd42619545"
|
||||
res = client.get(f"/api/projects/{pid}/plan/wmt/landslide/12/3500/1600.png")
|
||||
assert res.status_code == 404 and "SAFEMAP_API_KEY" in res.json()["detail"]
|
||||
|
||||
@@ -269,7 +269,7 @@ def test_router_vector(data):
|
||||
app = FastAPI()
|
||||
app.include_router(router)
|
||||
client = TestClient(app)
|
||||
pid = "ce266c60-ab1f-416b-92f2-f37d1bf539d8"
|
||||
pid = "4d3c385d-c9b5-4293-841a-82cd42619545"
|
||||
z, x, y = _tile(LON, LAT, 13)
|
||||
res = client.get(f"/api/projects/{pid}/plan/vt/forest_road/{z}/{x}/{y}.pbf")
|
||||
assert res.status_code == 200 and res.headers["content-type"] == "application/x-protobuf"
|
||||
|
||||
@@ -23,7 +23,7 @@ from D03_PlanAnalysis import D03_PlanAnalysis_Router as router_mod
|
||||
from D03_PlanAnalysis import D03_PlanAnalysis_TerrainSource as source
|
||||
from D03_PlanAnalysis import D03_PlanAnalysis_ZeroOrder as zero_order
|
||||
|
||||
PID = "12953f5a-5ba1-42ad-a427-8ac857a58bc2"
|
||||
PID = "047b41bf-9bff-429a-a2de-f1c294250732"
|
||||
EPSG = 5186
|
||||
X0, Y0 = 200000.0, 450000.0
|
||||
BOX = (X0, Y0, X0 + 400.0, Y0 + 400.0)
|
||||
|
||||
@@ -210,7 +210,7 @@ def test_자료집_길_같은_이름_409_덮어쓰기(world, monkeypatch):
|
||||
app.dependency_overrides[verify_session] = lambda: session
|
||||
client = TestClient(app)
|
||||
block = world["block"]
|
||||
url = "/api/projects/8b98ca75-c572-4002-8468-2adae4323414/estimation/daega/personal"
|
||||
url = "/api/projects/a67588be-6715-4823-90fb-ab0946666130/estimation/daega/personal"
|
||||
user = {"daega_cover": {block["cover"]: {"sangeun:SG:GF000219#0": {"qty": 4}}}}
|
||||
body = {"cover": block["cover"], "name": "길 시험", "user": user}
|
||||
first = client.post(url, json=body)
|
||||
|
||||
@@ -40,7 +40,7 @@ WANT = {
|
||||
"소광": (25, 117, 98, 19, 0, 0, 0, 173311386, 0, 0),
|
||||
"영월": (23, 138, 135, 3, 0, 21, 34, 767148700, 28, 2951),
|
||||
}
|
||||
URL = "/api/projects/8b98ca75-c572-4002-8468-2adae4323414/estimation/import/bill"
|
||||
URL = "/api/projects/a67588be-6715-4823-90fb-ab0946666130/estimation/import/bill"
|
||||
ALL = {"hopyo": True, "rates": True, "prices": True}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user