diff --git a/M02_MasterTemplete/M02_Library_Flat.py b/M02_MasterTemplete/M02_Library_Flat.py index bc632bb9a..3fc98d56c 100644 --- a/M02_MasterTemplete/M02_Library_Flat.py +++ b/M02_MasterTemplete/M02_Library_Flat.py @@ -1,6 +1,6 @@ """M02 단가산출(SK) · 일위대가(SC) 펼침 · 초기화 · 옮기기(PLAN 740-1 · 요구 581 · 분석 579-2). -서로 독립 — 연결 고리 = M01 키만. M02 문서를 넣으면(찾아 넣기 `-flat` · 저장 · 읽기 · 층 사이 +서로 독립 — 연결 고리 = M01 키만. M02 문서를 넣으면(저장 · 읽기 · 층 사이 복사) 그 문서 몸을 M01 키 줄 + 그 문서 덮개 사본으로 펼쳐 담음 → 원본이 나중에 바뀌어도 넣은 쪽 금액 그대로. 줄 `본뜬 {층, 주인, 키, 이름, 때}` = 출처 정보(셈에 안 씀). SK 에 SK 더한줄 로직 한 줄 = 원본 몸 통째(바탕 기초 · 입력값 · 덮개 · 뺀줄 · 고름 · 자재표시 · @@ -18,7 +18,7 @@ 바탕 SK 참조 · 패치 있는 SK 참조 줄 = 위 덮개를 아래 덮개에 겹쳐 한 벌(`compose` · 율 기준 줄 열쇠 `add:#k` 도 새 차례로 · 778-4) 율 줄(778-4) 있는 바탕 없는 SK = 한 줄로 못 펼침(율 · 기준 묶음이 넣는 쪽 줄로 번짐) → 참조 그대로 -못 펼친 줄 = 저장 · 읽기 · 옮기기에선 옛 참조 그대로(값 그대로) · 넣기 길(`strict`)에선 400 까닭. +못 펼친 줄 = 저장 · 읽기 · 옮기기에선 옛 참조 그대로(값 그대로) · `strict` = 400 까닭(옛 찾아 넣기 `-flat` 길은 걷음 · 855 2-E2). 초기화(`reset`) = 덮개 · 뺀줄 · 더한줄 단가 걷음(안쪽 넣은 몸 · 사본 블록까지) · 이음 기계 고정 줄 단가 = M01 기계 한 시간 값 다시 받음(736-3) · 항목 · 수량 · 입력값 · 고름 · 자재표시 · 켜쌓기율 · 기본정보 남김 → 값 = 연결된 M01 키 값. @@ -439,27 +439,6 @@ def flat_doc( return flat_sc(doc, read, whole, trail, strict, sk=False) # 811-1 SK 줄 = 참조 한 행 -def flat_lines(kind: str, ref: Any, qty: Any = 1, doc: Any = None) -> dict[str, Any]: - """찾아 넣기(`-flat` 길) — `kind` 문서에 `ref` 를 넣을 줄 · 못 펼침 = StoreError 400 · - SC = 로직 줄(SK) · 사본 블록 줄(SC) 하나 · 지금 화면 문서 `doc` 과 겹치면 400.""" - from M02_MasterTemplete import M02_MasterTemplete_Store as store - - at = refs.here() - try: - ref = refs.check_ref(ref, "넣을 문서", at) - whole = _whole() - if kind == "sangeun": - return {"더한줄": into_sk(ref, qty if qty not in EMPTY else 1, refs.read_ref, whole)} - got = flat_sc({"담은로직": [{"참조": ref, "수량": None}]}, refs.read_ref, whole) - host = doc if isinstance(doc, dict) else {} - trial = {"담은로직": [*(host.get("담은로직") or []), *got["담은로직"]]} - if twice := _twice({**trial, "자재": host.get("자재") or []}): - raise sd.DocError(f"이미 담은 줄과 겹침 「{twice}」") - return {"담은로직": got["담은로직"], "자재": []} - except FAIL as e: - raise store.StoreError(getattr(e, "status", 400), str(e)) from e - - # ── 초기화 ──────────────────────────────────────────────────────────── def _reprice(fx: dict) -> tuple[dict, int]: """이음 기계 고정 줄(736-3) 단가 = M01 기계 한 시간 값 다시 받음 — (줄, 바뀐 수).""" diff --git a/M02_MasterTemplete/M02_Library_Same_Router.py b/M02_MasterTemplete/M02_Library_Same_Router.py index 36dafde1f..0c4b89389 100644 --- a/M02_MasterTemplete/M02_Library_Same_Router.py +++ b/M02_MasterTemplete/M02_Library_Same_Router.py @@ -11,8 +11,6 @@ POST …/undo {키} — `_합친것/` 에서 되돌림 · 옮긴 참조도 되 `M02_Library_Delete.undo`(문서 · 자리 · 고친 문서 앞판) POST /layers/{층}/{kind}-tree/delete-check {대상} — 나무 지우기 미리 보기(735-1) · 지울 문서 · 쓰는 줄 -POST /layers/{층}/{kind}-flat {참조, 수량?, 문서?} — 넣을 줄(740-1 · M02 문서 → M01 키 줄 + 덮개 - 사본 · 본뜬 · `M02_Library_Flat.flat_lines`) · 층 읽기 권한 · 못 펼침 400 POST /layers/{층}/{kind}-reset {키 | 문서, 미리보기, 판?} — [초기화](740-1) · 걷힐 수 · 문서 · 미리보기 false = 그 층에 씀(쓰기 권한) 지움 = 이 층 문서만 · 남김 = 이 층 또는 위 층(위 층과 같은 아래 층 문서 = 남김 = 위 층 키) · @@ -399,15 +397,6 @@ def library_same_undo( return _run(undo, session, _root(session, layer, owner, write=True), kind, body.키) -class FlatBody(BaseModel): - """`참조` = 넣을 문서 {층, 주인, 키} · `수량` = 그 문서 단위 수(SK 만 · 기본 1) · `문서` = 지금 - 화면 문서(SC 겹침 검사).""" - - 참조: dict[str, Any] - 수량: float | None = None - 문서: dict[str, Any] | None = None - - class ResetBody(BaseModel): 키: str | None = None 문서: dict[str, Any] | None = None @@ -420,19 +409,6 @@ def _in(folder: Path, fn, *args): return fn(*args) -@router.post("/layers/{layer}/{kind}-flat") -def library_flat( - layer: Layer, - kind: Kind, - body: FlatBody, - owner: str | None = None, - session: Session = Depends(verify_session), -) -> dict: - """찾아 넣기(740-1) — 넣을 줄(SK `더한줄` · SC `담은로직` + `자재`) · 저장 안 함.""" - folder = _root(session, layer, owner) - return _run(_in, folder, flat.flat_lines, kind, body.참조, body.수량, body.문서) - - @router.post("/layers/{layer}/{kind}-reset") def library_reset( layer: Layer, diff --git a/M02_MasterTemplete/M02_Sangeun_Calc.py b/M02_MasterTemplete/M02_Sangeun_Calc.py index 42d0b5687..e26f10e73 100644 --- a/M02_MasterTemplete/M02_Sangeun_Calc.py +++ b/M02_MasterTemplete/M02_Sangeun_Calc.py @@ -454,12 +454,6 @@ def unit(doc: dict, whole: Any, expand: Any, trail: tuple) -> dict[str, Any]: } -def head_of(doc: dict) -> str: - """머리 띠 — 「1 본 당」 · 앞 수 있는 단위 = 「100본 당」.""" - unit = str(doc.get("단위") or "") - return f"{unit} 당" if unit[:1].isdigit() else f"1 {unit} 당" - - def per_unit(got: dict, doc: dict) -> dict: """화면 셈 답 줄 · 계 = SK 1 단위 몫(728-2) — 수량 · 금액 · 비목 ÷배(율 · 단가 그대로) · 「식」 · 빈 단위(일위대가 줄 모드) = 옛 바탕 몫 그대로.""" @@ -524,9 +518,9 @@ def clean_doc(doc: Any, here_: refs.Here) -> dict[str, Any]: return out -def calc_doc(doc: Any, given: dict | None = None, seen: bool = True) -> dict[str, Any]: - """셈 길(`M02_Sangeun_Router`) — 지금 층 문서 · 저장 전 화면 문서 · 틀림 400 · 순환 422 · - `seen` = 옛 보기 덧칸 자리(856-1 뒤 안 지음 · 길 꼴만 · 2-E2 에서 걷음).""" +def calc_doc(doc: Any, given: dict | None = None) -> dict[str, Any]: + """문서 셈 묶음(저장 안 함 · 지금 층) — 꼴 검사 · 위 층 참조 · 순환 422 → `run` → 1 단위 몫 · 사본 표지 · + 틀림 400(옛 화면 셈 길 `/sangeun/calc` 은 걷음 · 855 2-E2).""" from M01_MasterData import M01_MasterData_Store as m01 with m01.cache.steady(): # 한 셈 동안 M01 파일 자국 한 번(792-2) diff --git a/M02_MasterTemplete/M02_Sangeun_Const.py b/M02_MasterTemplete/M02_Sangeun_Const.py index b52f7c8db..4229f4311 100644 --- a/M02_MasterTemplete/M02_Sangeun_Const.py +++ b/M02_MasterTemplete/M02_Sangeun_Const.py @@ -14,7 +14,7 @@ 셈 = `M02_Sangeun_Doc.patched` 첫머리 `formulas`(바탕 줄 식을 바꾼 사본) → 모든 셈 길(화면 · 저장 원값 · B09 · 펼침 겹침) 한 벌 · 펼침(`M02_Library_Flat._read`) = 새 덮개 SK 는 안 펼침 (옛 참조 그대로) · [초기화](`M02_Library_Flat.reset`) = `restore` 전체. -화면 셈 답(`answer`) = 문서 셈 답 + 머리(옛 `원래` · `시트` 덧칸은 855 2-C1 에서 걷음 · 상세 몸 856-1). +셈 답(`answer`) = 문서 셈 답 1 단위 몫(옛 `원래` · `시트` 덧칸 855 2-C1 · 머리 띠 855 2-E2 에서 걷음). """ from __future__ import annotations @@ -282,10 +282,9 @@ def kinds(doc: dict, spot: str) -> list[str]: return out + (["뺌"] if spot in (doc.get("뺀줄") or []) else []) -# ── 화면 셈 답 ──────────────────────────────────────────────────────── +# ── 셈 답 ────────────────────────────────────────────────────────── def answer(got: dict, clean: dict) -> dict: - """`M02_Sangeun_Calc.calc_doc` 답 — 셈 답(1 단위 몫) + 머리 · 가져온 식 원본 보기(옛 `원래` · `시트` 걷음 · 855 2-C1).""" + """`M02_Sangeun_Calc.calc_doc` 답 — 셈 답(1 단위 몫) + 가져온 식 원본 보기(옛 `원래` · `시트` · 머리 걷음).""" from M02_MasterTemplete import M02_Sangeun_Calc as calc - out = {**calc.per_unit(got, clean), "머리": calc.head_of(clean)} - return calc.labor._json(imp.more(out, clean)) + return calc.labor._json(imp.more(calc.per_unit(got, clean), clean)) diff --git a/M02_MasterTemplete/M02_Sangeun_Copy.py b/M02_MasterTemplete/M02_Sangeun_Copy.py index 2116a198d..f425d0a77 100644 --- a/M02_MasterTemplete/M02_Sangeun_Copy.py +++ b/M02_MasterTemplete/M02_Sangeun_Copy.py @@ -408,8 +408,8 @@ def preview(doc: Any, job: str, given: dict | None = None) -> dict[str, Any]: old = doc.get(JOB) new = REGEN if REGEN in (old, job) else job after_doc = {**doc, JOB: new} - before = calc.calc_doc(doc, given, False) - after = calc.calc_doc(after_doc, given, False) + before = calc.calc_doc(doc, given) + after = calc.calc_doc(after_doc, given) out: dict[str, Any] = {"문서": after_doc, "전": _money(before), "후": _money(after)} if cut := [ str(x.get("이름") or x.get("로직")) for x in doc.get("더한줄") or [] if x.get("끊음") diff --git a/M02_MasterTemplete/M02_Sangeun_Router.py b/M02_MasterTemplete/M02_Sangeun_Router.py index 7040427e0..dfe1429f9 100644 --- a/M02_MasterTemplete/M02_Sangeun_Router.py +++ b/M02_MasterTemplete/M02_Sangeun_Router.py @@ -1,13 +1,10 @@ -"""M02 단가산출(SK) 셈 길(PLAN 715-1b) — `POST /api/m02/layers/{층}/sangeun/calc` · -일위대가 [+ 줄] M01 기초 = 그 층 SK 사본(811-1 · `M02_Labor_SkRow`) `…/sangeun/from-logic`(층 쓰기) · +"""M02 단가산출(SK) 서버 길 — 일위대가 [+ 줄] M01 기초 = 그 층 SK 사본(811-1 · `M02_Labor_SkRow`) `…/sangeun/from-logic`(층 쓰기) · 가져온 식(793-2 · `M02_Sangeun_Imported`) `…/sangeun/imported/price` · `/link`(화면 캐시 문서 고침 · 저장 없음 · 층 읽기 · 기초로 바꾸기 없음 · 809-1) · 불러오기 단산 블록 → 가져온 식(793-3b · `M02_Sangeun_FromHopyo`) `…/sangeun/from-hopyo` (늘 개인 층 쓰기 · 몸 `문서` = 미리 보기에서 고친 문서) · 미리 보기 `…/from-hopyo/preview`(층 읽기 · 안 씀 · 835-1). -저장 안 함 · 로그인 사용자 · 층 읽기 권한(`Router_Items._root`) · 화면은 최신 응답만. -몸 = `문서`(저장 전 화면 문서) 또는 `키`(그 층 저장본) + `입력값`(열린입력 · 시험 값) · -`보기` false = 보기 덧칸(`글` · `중간` · 750-1) 안 지음(바탕 원값 셈처럼 금액만 쓸 때). +옛 셈 길 `…/sangeun/calc` 는 걷음(화면 = 줄 쌓기 문서 셈 · 855 2-E2) · 로그인 사용자 · 층 권한(`Router_Items._root`). 문서 읽기 · 쓰기 · 새로 · 복사 · 지우기는 양식 길 · 서고 길 그대로(종류 `sangeun`). ⚠ 등록은 `main.py`(로그인만). """ @@ -20,7 +17,6 @@ from fastapi import APIRouter, Depends, HTTPException from pydantic import BaseModel from common_util.common_util_auth import verify_session -from M02_MasterTemplete import M02_MasterTemplete_Store as store from M02_MasterTemplete import M02_San_MatPick as mat_pick from M02_MasterTemplete import M02_Sangeun_Calc as calc from M02_MasterTemplete import M02_Sangeun_Doc as sd @@ -32,22 +28,6 @@ from M02_MasterTemplete.M02_MasterTemplete_Router_Items import Layer, Session, _ router = APIRouter(prefix="/api/m02", tags=["M02 MasterTemplete Sangeun"]) -class SangeunCalcBody(BaseModel): - 문서: dict[str, Any] | None = None - 키: str | None = None - 입력값: dict[str, Any] | None = None - 보기: bool = True - - -def _calc(body: SangeunCalcBody) -> dict[str, Any]: - doc = body.문서 - if doc is None: - if not sd.KEY.match(str(body.키 or "")): - raise store.StoreError(400, "문서 또는 키(SK-######)") - doc = store.read(sd.KIND, str(body.키))["문서"] - return calc.calc_doc(doc, body.입력값, body.보기) - - class FromLogicBody(BaseModel): 로직: str 새로: bool = False @@ -68,19 +48,6 @@ def sangeun_from_logic( return _call(folder, skrow.from_logic, body.로직, body.새로, body.씀) -@router.post("/layers/{layer}/sangeun/calc") -def calc_sangeun( - layer: Layer, - body: SangeunCalcBody, - owner: str | None = None, - session: Session = Depends(verify_session), -) -> dict: - """단가산출 셈 — 줄(cid · 덮개 · 원값) · 기준 · 1단위 · 짝잃음(저장 안 함).""" - if body.문서 is None and body.키 is None: - raise HTTPException(status_code=400, detail="문서 또는 키") - return _call(_root(session, layer, owner), _calc, body) - - class FromHopyoBody(BaseModel): 층: Layer 주인: str | None = None diff --git a/resources/tester/test_728_2_sk_unit.py b/resources/tester/test_728_2_sk_unit.py index d2479b9fd..5147b5249 100644 --- a/resources/tester/test_728_2_sk_unit.py +++ b/resources/tester/test_728_2_sk_unit.py @@ -40,10 +40,8 @@ def test_단목베기_100본_제안_본으로_바꾸면_1본_계(whole): assert full["배"] == 1 and full["기준"]["계"] == Decimal( "255186" ) # 수식 문서 기본 옵션(흉고직경 14 · 단목 · 855 2-C1) - assert sc.head_of({"단위": "100본"}) == "100본 당" one = _shown(whole, _doc("GF000287", "본")) assert one["배"] == 100 and round(one["기준"]["계"], 2) == Decimal("2551.86") - assert sc.head_of({"단위": "본"}) == "1 본 당" pairs = [(x["수량"], y["수량"]) for x, y in zip(full["줄"], one["줄"], strict=True)] assert all(b == a / 100 for a, b in pairs) and one["화면배"] == 100 # 세부 품 ÷100 diff --git a/resources/tester/test_740_1_library_flat.py b/resources/tester/test_740_1_library_flat.py index 81f465065..0e496cf7b 100644 --- a/resources/tester/test_740_1_library_flat.py +++ b/resources/tester/test_740_1_library_flat.py @@ -21,7 +21,6 @@ from fastapi.testclient import TestClient from common_util.common_util_auth import verify_session from M01_MasterData import M01_MasterData_Store as m01 from M02_MasterTemplete import M02_Labor_Ref as refs -from M02_MasterTemplete import M02_Library_Flat as flat from M02_MasterTemplete import M02_Library_Same as same from M02_MasterTemplete import M02_Library_Same_Router as same_router from M02_MasterTemplete import M02_MasterTemplete_Store as store @@ -112,27 +111,20 @@ def test_SC_에_SC_사본_블록_실무수량_겹침_원본_지워도(world): assert block["몸"]["본뜬"]["실무수량"]["줄"] == {"0": 3} # 엑셀 대조 · 하위 호표 끝수 assert _sc_value(me, host) == pytest.approx(before, rel=1e-9) with store.at(me): - got = flat.flat_lines("precombo", {**MINE, "키": old}, None, {"담은로직": [{"로직": GF}]}) (me / "precombo" / f"{old}.json").unlink() # 옛 꼴 문서(참조) 치움 assert refs.users({**MINE, "키": inner}) == [] store.delete("precombo", inner) assert _sc_value(me, host) == pytest.approx(before, rel=1e-9) # 원본 지워도 그대로 - assert got["담은로직"][0]["참조"]["층"] == "사본" # 넣기 길도 블록(겹침 없음) -def test_길_넣기_초기화_권한(world): +def test_길_초기화_권한(world): app = FastAPI() app.include_router(same_router.router) app.dependency_overrides[verify_session] = lambda: USER client = TestClient(app) me = world["personal"] y = _y(me) - url = "/api/m02/layers/personal/{}-{}" - res = client.post(url.format("sangeun", "flat"), json={"참조": {**MINE, "키": y}, "수량": 1}) - assert res.status_code == 200, res.text - assert res.json()["더한줄"][0]["본뜬"]["키"] == y - bad = client.post(url.format("precombo", "flat"), json={"참조": {**MINE, "키": "SK-000777"}}) - assert bad.status_code == 400 + url = "/api/m02/layers/personal/{}-{}" # 옛 찾아 넣기 `-flat` 길은 걷음(855 2-E2) look = client.post(url.format("sangeun", "reset"), json={"키": y}) assert look.status_code == 200 and look.json()["걷힘"] == 1 firm = client.post("/api/m02/layers/company/sangeun-reset", json={"키": y, "미리보기": False}) diff --git a/resources/tester/test_778_2_hopyo_machine_link.py b/resources/tester/test_778_2_hopyo_machine_link.py index 91be31ed5..f75bc9340 100644 --- a/resources/tester/test_778_2_hopyo_machine_link.py +++ b/resources/tester/test_778_2_hopyo_machine_link.py @@ -8,13 +8,10 @@ import threading from M01_MasterData import M01_MasterData_Store as m01 from M02_MasterTemplete import M02_Hopyo_Units as units from M02_MasterTemplete import M02_Sangeun_Calc as calc -from M02_MasterTemplete import M02_Sangeun_Router as sangeun_router -from resources.tester.test_m02_hopyo_excel import client # noqa: F401 -def test_목록_밖_기계_서버_둘째_요청에도_셈(client): # noqa: F811 - m01.loaded() # 마스터 = 이 스레드에서 지음 · 요청 = 다른 스레드(문맥 안 따라감) - client.app.include_router(sangeun_router.router) +def test_목록_밖_기계_둘째_셈에도_셈(): + m01.loaded() # 마스터 = 이 스레드에서 지음 · 셈 = 다른 스레드(문맥 안 따라감) doc = { "키": "SK-000000", "이름": "t", @@ -22,10 +19,9 @@ def test_목록_밖_기계_서버_둘째_요청에도_셈(client): # noqa: F811 "바탕": {"로직": "GC000268"}, "입력값": {units.MACH_IN: "0211-0060"}, } # fmt: skip — 855 2-C1 바탕 로직 + 입력값 - for _ in range(2): - got = client.post("/api/m02/layers/personal/sangeun/calc", json={"문서": doc}) - assert got.status_code == 200, got.text - assert got.json()["기준"]["경비"] == 27120, got.json().get("까닭") + for _ in range(2): # 옛 셈 길 `/sangeun/calc` 은 걷음(855 2-E2) — 같은 셈 묶음을 바로 + got = calc.calc_doc(doc) + assert got["기준"]["경비"] == 27120, got.get("까닭") whole, out = m01.loaded()[1], {} # 지은 문맥 밖 스레드(서버 요청 스레드 풀과 같음) run = threading.Thread(target=lambda: out.update(calc.run(doc, whole))) run.start() diff --git a/resources/tester/test_792_1_sangeun_formula.py b/resources/tester/test_792_1_sangeun_formula.py index 2266cc2b0..4955671ac 100644 --- a/resources/tester/test_792_1_sangeun_formula.py +++ b/resources/tester/test_792_1_sangeun_formula.py @@ -137,8 +137,8 @@ def _calc(folder, doc): def test_펼침_막음_초기화_걷음(world): mine = world["personal"] a = _sk(mine, 바탕={"로직": CARRY}, 입력값=_carry(), 변수줄=[{"이름": "할증율", "식": "20"}]) - with store.at(mine), pytest.raises(store.StoreError): - flat.flat_lines("sangeun", {**MINE, "키": a}) + with store.at(mine), pytest.raises(sd.DocError): + const.no_flat(_read(mine, a)) # 식 칸 SK = 안 펼침(저장 · 읽기 펼침 첫머리) doc, n = flat.reset("sangeun", {**_plus(), "까닭": {MAN: "할증"}}) assert n == 1 and "식덮개" not in doc and "까닭" not in doc and doc["변수줄"] assert const.restore(_plus(), MAN).get("식덮개") is None diff --git a/resources/tester/test_795_1_sk_copy.py b/resources/tester/test_795_1_sk_copy.py index c6ed834dc..3f1d826ad 100644 --- a/resources/tester/test_795_1_sk_copy.py +++ b/resources/tester/test_795_1_sk_copy.py @@ -74,7 +74,7 @@ def _save(folder, key, doc): def _calc(folder, doc): with store.at(folder): - return calc.calc_doc(doc, None, False) + return calc.calc_doc(doc) def _sum(folder, key): diff --git a/resources/tester/test_821_1_my_machine.py b/resources/tester/test_821_1_my_machine.py index 5e24d133c..561810eb7 100644 --- a/resources/tester/test_821_1_my_machine.py +++ b/resources/tester/test_821_1_my_machine.py @@ -71,7 +71,7 @@ def _doc(folder, key): def _calc(folder, doc): - return _at(folder, calc.calc_doc, doc, None, False) + return _at(folder, calc.calc_doc, doc) def _sum(folder, key): diff --git a/resources/tester/test_822_2_machine_hourly_all.py b/resources/tester/test_822_2_machine_hourly_all.py index 46037133c..ba63f5df0 100644 --- a/resources/tester/test_822_2_machine_hourly_all.py +++ b/resources/tester/test_822_2_machine_hourly_all.py @@ -188,7 +188,7 @@ def test_direct_formula_my_machine(world): } name = _at(me, lambda: refs.create("sangeun", body)["이름"]) # 855 2-C1 — 옛 더한줄 대신 바탕 doc = _at(me, lambda: store.read("sangeun", name)["문서"]) - got = _at(me, calc.calc_doc, doc, None, False)["기준"] + got = _at(me, calc.calc_doc, doc)["기준"] assert (got["노무비"], got["재료비"], got["경비"]) == (10, 20, 30) diff --git a/resources/tester/test_826_3_copy_slim.py b/resources/tester/test_826_3_copy_slim.py index 141557db0..2cad8f582 100644 --- a/resources/tester/test_826_3_copy_slim.py +++ b/resources/tester/test_826_3_copy_slim.py @@ -77,8 +77,8 @@ def test_base_logic_read_rows_only(world): full = {**doc, skc.KEY: skc.stamp(doc)} # 옛 길 사본(후보 전부) assert len(_keys(full[skc.KEY])) >= 3 * len(_keys(have)) with store.at(me): - old = calc.calc_doc(full, None, False)["기준"] - new = calc.calc_doc(doc, None, False)["기준"] + old = calc.calc_doc(full)["기준"] + new = calc.calc_doc(doc)["기준"] assert new == old and new["계"] > 0 assert _sum(me, key) == new["계"] diff --git a/resources/tester/test_836_2_sk_auto_renew.py b/resources/tester/test_836_2_sk_auto_renew.py index 4f9cb2ecf..6b449acb9 100644 --- a/resources/tester/test_836_2_sk_auto_renew.py +++ b/resources/tester/test_836_2_sk_auto_renew.py @@ -77,7 +77,7 @@ def _labor_unit(me, key: str): def _list_unit(me, key: str): """목록 · 옛 셈 길(`calc_doc`) 1 단위 계.""" with store.at(me): - got = calc.calc_doc(store.read("sangeun", key)["문서"], None, False) + got = calc.calc_doc(store.read("sangeun", key)["문서"]) return got["1단위"]