Merge remote-tracking branch 'origin/sub_laptop_6' into sub_laptop_8

This commit is contained in:
2026-10-31 18:09:11 +09:00
2 changed files with 34 additions and 3 deletions
+21
View File
@@ -326,6 +326,27 @@ def test_복사는_못_읽는_참조를_같이_복사_본뜬(world):
assert e.value.status == 400
def test_복사_새_키_규격_열_수량도_따라감(world):
"""통합 점검 — 회사에 올리기 승인 · 회사로 복사: 개인 참조가 회사 새 키로 바뀌면 규격 열 수량 열쇠도."""
inner = _combo(world["personal"], [{"로직": TEN}], "안")
old = f"참조|personal|7/42|{inner}"
spec = {
"이름": "H",
"열": ["1.5", "2.0"],
"기본": "1.5",
"수량": {old: {"1.5": 1, "2.0": 1.3}, "고정|돌|가|㎡": {"1.5": 2, "2.0": 2.6}},
}
doc = {"담은로직": [{"참조": {**MINE, "키": inner}}], "규격": spec}
with store.at(world["company"]):
got = refs.carry(doc, ("personal", "7/42"))
new = f"참조|company|7|{got['담은로직'][0]['참조']['키']}"
assert got["규격"]["수량"] == {
new: {"1.5": 1, "2.0": 1.3},
"고정|돌|가|㎡": {"1.5": 2, "2.0": 2.6},
}
assert doc["규격"]["수량"][old] == {"1.5": 1, "2.0": 1.3} # 원본 그대로
def test_길_새로_복사_권한(world):
from fastapi import FastAPI
from fastapi.testclient import TestClient