Merge remote-tracking branch 'origin/dev' into sub_laptop_4

This commit is contained in:
2026-10-26 04:02:30 +09:00
7 changed files with 59 additions and 19 deletions
@@ -4071,7 +4071,7 @@
"폭": 14
},
"B": {
"폭": 26
"폭": 33
},
"C": {
"폭": 16
@@ -117,7 +117,7 @@
- 6 행 · 10 행 서식을 줄마다 복사 · 저장본 = (측점 · 종류 · 비탈)마다 가장 최근 하나.
## s11 암반검토 (프로그램 몫 · E06 암반 해석 저장본 · 없으면 시트를 뺌)
## s11 암반검토 (프로그램 몫 · E06 암반 해석 저장본 · 없으면 시트를 뺌 · 측점 표 머리 줄 쪽마다 반복)
| 칸 | 내용 |
| --- | --- |
+22 -4
View File
@@ -418,8 +418,10 @@ def plan_repo(monkeypatch):
async def assignees(_pid):
return [
{"id": 7, "year": 2026, "company_id": 5},
{"id": 8, "year": 2027, "company_id": 5},
{"id": 7, "year": 2026, "company_id": 5, "company_name": "가", "email": "a@ga.kr"},
{"id": 8, "year": 2027, "company_id": 5, "company_name": "가", "email": "a@ga.kr"},
{"id": 9, "year": 2027, "company_id": None, "company_name": "나", "email": "b@na.kr"},
{"id": 10, "year": 2028, "company_id": 6, "company_name": "다", "email": "c@da.kr"},
]
monkeypatch.setattr(repo, "get_plan_project", project)
@@ -447,13 +449,29 @@ def test_export_shared_gets_own_confirmed_year(plan_repo):
def test_summary_year_rows(plan_repo):
out = asyncio.run(d04.get_plan_summary(PLAN_ID))
forest = {"role": "USER", "email": "kim@forest.go.kr", "company_id": 1}
out = asyncio.run(d04.get_plan_summary(PLAN_ID, forest))
first = out["years"][0]
assert first["saved"] and first["start"]["x"] == P2026[0][0] and first["confirmed_at"] == "x"
assert 120 < first["start"]["lon"] < 135 and first["end_chainage_m"] == pytest.approx(
first["length_m"]
)
assert out["years"][1]["confirmed_at"] is None and len(out["assignees"]) == 2
assert out["years"][1]["confirmed_at"] is None and len(out["assignees"]) == 4
def test_shared_company_sees_only_own_firm(plan_repo):
"""지정 회사 = 자기 연도 줄 · 자기 행만 — 남의 업체 이름 · 메일은 응답에 없음(요구 351)."""
other = {"role": "USER", "email": "x@ga.kr", "company_id": 6} # 2028 만(노선 없음)
for session, years, ids in ((SESSION, [2026, 2027], [7, 8]), (other, [], [10])):
out = asyncio.run(d04.get_plan_summary(PLAN_ID, session))
assert [y["year"] for y in out["years"]] == years
assert [a["id"] for a in out["assignees"]] == ids
listed = asyncio.run(d04.get_plan_assignees(PLAN_ID, session))["assignees"]
assert [a["id"] for a in listed] == ids
text = str(asyncio.run(d04.get_plan_summary(PLAN_ID, SESSION)))
assert "b@na.kr" not in text and "c@da.kr" not in text and "나" not in text
admin = {"role": "SYSTEM_ADMIN", "email": "root@x.kr", "company_id": 99}
assert len(asyncio.run(d04.get_plan_assignees(PLAN_ID, admin))["assignees"]) == 4
def test_put_assignees_years_clears_empty_year(plan_repo, monkeypatch):
+6
View File
@@ -227,6 +227,11 @@ def test_wedge_gravity_water_and_bolt():
assert bolted["F"] > dry["F"]
def test_fmt_negative_zero():
assert str(model._fmt(-0.0)) == "0.0" # 들림 · 볼트 없음 = 0(「-0.0」 아님)
assert model._fmt(math.inf) is None
def test_wedge_not_formed():
# 교선이 사면보다 가파름 → 사면으로 안 나옴
assert _wedge((141, 75), (219, 75), (180, 50), 35) is None
@@ -480,6 +485,7 @@ def test_e05_rock_sheet(monkeypatch):
assert "기본값 · 사용자 확정 전" in cells["B7"]["값"] and "½" in cells["B7"]["값"]
assert cells["B9"]["값"].startswith("깎기 비탈 1")
assert cells["A13"]["값"] == doc["sets"][0]["name"]
assert sheet["인쇄"]["머리행"] == [16, 16] and cells["A16"]["값"] == "측점" # 절리 한 줄
rows = [r for r in range(17, 40) if cells.get(f"A{r}", {}).get("값") == "STA"]
assert len(rows) == len(stations[0]["cases"]) + len(stations[0]["kinematic"]["toppling"])
for r, case in zip(rows, stations[0]["cases"]):