From 41d2b1101484396cca4266b2fc2746d8c05dfb5b Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sun, 15 Nov 2026 14:17:18 +0900 Subject: [PATCH] =?UTF-8?q?test(837-1):=20=EB=B6=88=EB=9F=AC=EC=98=A4?= =?UTF-8?q?=EA=B8=B0=20=EC=B8=B5=20=EA=B3=A0=EC=A0=95=EC=97=90=20=EA=B1=B8?= =?UTF-8?q?=EB=A6=B0=20=EB=82=A1=EC=9D=80=20=EC=8B=9C=ED=97=98=20=EA=B3=A0?= =?UTF-8?q?=EC=B9=A8=20=E2=80=94=20=EC=B8=B5=20=EA=B6=8C=ED=95=9C=20403=20?= =?UTF-8?q?=E2=86=92=20=EA=B2=BD=EB=A1=9C=20=EC=B8=B5=20=EB=AC=B4=EC=8B=9C?= =?UTF-8?q?=20200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - test_m02_hopyo_excel: 역할 표 · 마스터 폴더 시험을 「늘 개인 층 · 마스터 폴더 증가 0」 로 갈음 - test_m02_hopyo_grid: 남의 개인 층 403 → 주인 글 무시 200 - test_m02_hopyo_screen: 층 고름 글 대조 → 층 고름 없음 Co-Authored-By: Claude Sonnet 5.5 --- resources/tester/test_m02_hopyo_excel.py | 34 +++++++++++------------ resources/tester/test_m02_hopyo_grid.py | 2 +- resources/tester/test_m02_hopyo_screen.py | 5 ++-- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/resources/tester/test_m02_hopyo_excel.py b/resources/tester/test_m02_hopyo_excel.py index 3d84889a9..e2a59a820 100644 --- a/resources/tester/test_m02_hopyo_excel.py +++ b/resources/tester/test_m02_hopyo_excel.py @@ -191,32 +191,32 @@ def test_엉터리_시트없음_큰_파일_400(client, monkeypatch): @pytest.mark.parametrize( - ("role", "layer", "owner", "want"), + ("role", "layer", "owner"), [ - ({"role": "SYSTEM_ADMIN"}, "system", None, 200), - ({"role": "USER"}, "system", None, 403), - ({"role": "ADMIN"}, "company", None, 200), - ({"role": "USER"}, "company", None, 403), - ({"role": "USER"}, "personal", None, 200), - ({"role": "USER"}, "personal", "7/43", 403), - ({"role": "USER"}, "personal", "8/50", 403), + ({"role": "SYSTEM_ADMIN"}, "system", None), + ({"role": "USER"}, "system", None), + ({"role": "ADMIN"}, "company", None), + ({"role": "USER"}, "company", None), + ({"role": "USER"}, "personal", None), + ({"role": "USER"}, "personal", "7/43"), + ({"role": "USER"}, "personal", "8/50"), ], ) -def test_역할_표(client, role, layer, owner, want): +def test_역할_표_늘_개인_층(client, role, layer, owner): + """837-1 · 요구 855 — 누가 어느 경로 층 · 주인으로 올려도 자기 개인 층(옛 「층 권한 403」 갈음).""" client.who.update(role) params = {"owner": owner} if owner else {} - assert _post(client, layer, **params).status_code == want - if want == 200: - assert client.get(URL.format(layer)).json()["줄"][0]["호표수"] == 68 + assert _post(client, layer, **params).status_code == 200 + assert client.get(URL.format("personal")).json()["줄"][0]["호표수"] == 68 + assert client.get(URL.format(layer), params=params).json()["줄"][0]["호표수"] == 68 # 같은 자리 -def test_마스터_층은_마스터_폴더(client): +def test_마스터_경로로_올려도_마스터_폴더에_안_씀(client): client.who.update(role="SYSTEM_ADMIN") + before = master_hash() assert _post(client, "system").status_code == 200 - assert (client.system / hs.DIRNAME / "HP-000001.json").is_file() - client.who.update(role="USER") - assert client.get(URL.format("system")).json()["줄"][0]["키"] == "HP-000001" # 읽기 = 누구나 - assert client.delete(URL.format("system") + "/HP-000001").status_code == 403 + assert not (client.system / hs.DIRNAME).exists() # 837-1 — 마스터 폴더 증가 0 + assert master_hash() == before def _linked_xlsx() -> bytes: diff --git a/resources/tester/test_m02_hopyo_grid.py b/resources/tester/test_m02_hopyo_grid.py index 59aba9f0d..1e1e4ee04 100644 --- a/resources/tester/test_m02_hopyo_grid.py +++ b/resources/tester/test_m02_hopyo_grid.py @@ -100,7 +100,7 @@ def test_올리기_격자_200_404_지우기(client): ("role", "layer", "owner", "want"), [ ({"role": "USER"}, "personal", None, 200), - ({"role": "USER"}, "personal", "7/43", 403), + ({"role": "USER"}, "personal", "7/43", 200), # 837-1 — 주인 글 무시 · 늘 자기 개인 층 ({"role": "USER"}, "company", None, 200), ({"role": "USER"}, "system", None, 200), ], diff --git a/resources/tester/test_m02_hopyo_screen.py b/resources/tester/test_m02_hopyo_screen.py index 36d536b5b..eed03d6c1 100644 --- a/resources/tester/test_m02_hopyo_screen.py +++ b/resources/tester/test_m02_hopyo_screen.py @@ -39,9 +39,8 @@ def test_좌측_판_자리와_권한(): assert "input.hidden = true;" in hopyo_side choose = hopyo_side.split("async function choose()")[1].split("input.addEventListener")[0] assert "input.click();" in choose # 누름 하나 — 바로 파일 고르기 창 - assert "accessFor(layer, null, user).canWrite" in imp # 결과 층 = 쓸 수 있는 층만 - assert 'let pick: ManageLayer = "personal";' in hopyo_side # 기본 개인 - assert "layers.length > 1" in hopyo_side # 층 고름 = 둘 이상일 때만(일반 = 개인 하나) + assert "writableLayers" not in imp + hopyo_side # 837-1 층 고름 걷음 — 늘 개인 층 + assert "uploadHopyo(MINE, file)" in hopyo_side for gone in ("wantSangeun", "STEPS", "second(", "steps.set", "data-hopyo-sangeun"): assert gone not in imp + hopyo_side, gone # 중간 걸음 · 단가산출 체크 없음