작업실: 새 작품 이미지도 함께 커밋, 되돌리기 뒤 빈 폴더 정리

This commit is contained in:
koreafood committed 2026-10-31 11:19:50 +09:00
1 parent 767b2a30a3
commit ca2c0d077d
2 files changed
+22 -3

No files matched your search

+5 -2
View File
@@ -13,6 +13,9 @@ SLUG = "2026-10-whitework-tea-mat"
MD = ROOT / "content/products" / f"{SLUG}.md"
fails = []
# 제목은 파일에서 읽는다(사용자가 스튜디오로 언제든 바꿀 수 있으므로 하드코딩하지 않는다)
TITLE = next(line.split(":", 1)[1].strip() for line in MD.read_text(encoding="utf-8").splitlines()
if line.startswith("title:"))
def check(name, cond, extra=""):
@@ -52,7 +55,7 @@ head0 = state["head"]
# 2. 작품 열기
code, data = req(f"/api/product?slug={SLUG}")
check("GET /api/product", code == 200 and data["product"]["fields"]["title"] == "목련 한 땀 티매트", str(code))
check("GET /api/product", code == 200 and data["product"]["fields"]["title"] == TITLE, str(code))
fields0 = data["product"]["fields"]
body0 = data["product"]["body"]
check("본문 읽힘", len(body0) > 50)
@@ -79,7 +82,7 @@ check("목록 형식 유지(gallery)", "gallery:\n- assets/img/2026-10-whitework
check("front matter 순서 유지", text.splitlines()[1].startswith("slug:"), text.splitlines()[1])
code, data = req("/api/history")
check("이력에 수정 커밋", any("목련 한 땀 티매트" in row["subject"] for row in data["history"]), str(data["history"][:2]))
check("이력에 수정 커밋", any(TITLE in row["subject"] for row in data["history"]), str(data["history"][:2]))
# 5. 이미지 업로드 거부 (JPG 아님)
code, data = req("/api/upload?name=x.png", raw=b"\x89PNG\r\n")