test(M01): 조합 고치기 시험 — 은퇴한 PUT 길 대신 저장소 함수 combo_edit 로(39-1d 뒤)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013rJwJMVL4EE31y77TB11AP
This commit is contained in:
@@ -88,9 +88,14 @@ def _list(client: TestClient) -> list[dict]:
|
||||
|
||||
|
||||
def _edit(client: TestClient, key: str, version: str, row: dict, want: int = 200) -> dict:
|
||||
res = client.put(f"{SYS}/{key}", json={"combo": row, "판": version})
|
||||
assert res.status_code == want, res.text
|
||||
return res.json()
|
||||
"""조합 고치기 길(PUT)은 은퇴(39-1d) — 저장소 함수(실무문서 고치기)를 바로 부름."""
|
||||
try:
|
||||
done = combo_store.combo_edit(key, version, row, row.get("소유") or "")
|
||||
except store.StoreError as error:
|
||||
assert error.status == want, error.detail
|
||||
return {"detail": error.detail}
|
||||
assert want == 200
|
||||
return done
|
||||
|
||||
|
||||
def _inputs(key: str) -> dict:
|
||||
|
||||
@@ -144,5 +144,6 @@ def test_본뜬키는_목록에_나오고_없는_키_자기_키는_400(own) -> N
|
||||
assert own.post(SYS, json={"combo": bad}).status_code == 400
|
||||
version = own.get(f"{SYS}/{base}").json()["판"]
|
||||
me = {"이름": "원본", "본뜬키": base, "담은로직": combo["담은로직"]}
|
||||
res = own.put(f"{SYS}/{base}", json={"combo": me, "판": version})
|
||||
assert res.status_code == 400
|
||||
with pytest.raises(store.StoreError) as caught: # 조합 고치기 길(PUT) 은퇴 — 저장소 함수로
|
||||
combo_store.combo_edit(base, version, me)
|
||||
assert caught.value.status == 400
|
||||
|
||||
Reference in New Issue
Block a user