fix(M02): 도면 칸 CAD 💾 · Ctrl+S 가 페이지 [저장] 을 부름 · 엉터리 도각 파일은 400 · 자리표 패널 접기 단추 (PLAN 10-3)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PxvYb5ufV1kWdBvZbpDfu6
This commit is contained in:
@@ -56,3 +56,12 @@ def test_import_dxf():
|
||||
body = response.json()
|
||||
assert body["entity_count"] == 1
|
||||
assert body["drawing"]["entities"][0]["type"] == "Line"
|
||||
|
||||
|
||||
def test_import_garbage_is_400_not_500():
|
||||
for data in (b"garbage\x00\xff", b"", b"0\nSECTION\n2\nENTITIES\n0\nLINE\n10\nabc\n"):
|
||||
response = client.post(
|
||||
"/api/m02/drawing-import", files={"file": ("bad.dxf", data, "application/dxf")}
|
||||
)
|
||||
assert response.status_code == 400, (data, response.text)
|
||||
assert response.json()["message"]
|
||||
|
||||
Reference in New Issue
Block a user