feat(m02-cf): InputPanel 완성 — 서버 Api 최종 꼴(ref · Model 사용자 요소)에 맞춤 · 환율 유가전력 알약 이름

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ACSGaHdLgnkEkoA4LDtMU
This commit is contained in:
2026-10-01 16:13:08 +09:00
co-authored by Claude Sonnet 5.5
parent 2cecd38f35
commit e2dfbe687b
3 changed files with 99 additions and 46 deletions
@@ -113,7 +113,7 @@ def test_기계는_값_칸을_골라_요소가_됨():
assert got["name"].endswith("· 손료계수")
assert call("queryOf", "기계", "EQ000001#손료계수") == {
"group": "기계",
"key": "EQ000001",
"ref": "EQ000001",
"field": "손료계수",
}
@@ -127,8 +127,9 @@ def test_값_읽기_재료는_낮은_값_요율은_비율():
assert call("valueOf", "기계", MACHINE, "가격") == 76547
def test_사용자_요소는_사용자_그룹으로_물음():
assert call("queryOf", "인력", "UE-0001") == {"group": "사용자", "key": "UE-0001"}
def test_사용자_요소는_그_그룹의_ref_로_물음():
assert call("queryOf", "인력", "UE-0001") == {"group": "인력", "ref": "UE-0001"}
assert call("queryOf", "재료", "MT1") == {"group": "재료", "ref": "MT1"}
row = {"키": "UE-0001", "이름": "특수공", "규격": "", "단위": "원/일", "값": 300000}
assert call("elementOf", "인력", row)["unit"] == "원/일"
assert call("elementOf", "요율", {**row, "단위": "%"})["unit"] == "%"
@@ -204,3 +205,17 @@ def test_변수_검사는_쉬운_말():
assert call("checkVariable", many, []) == "선택 목록은 둘 이상"
bad = {**ok, "type": "choice", "choices": ["가", "나"], "example": "다"}
assert call("checkVariable", bad, []) == "예시값이 선택 목록에 없음"
def test_환율_유가전력_알약_이름에_날짜가_안_들어감():
fx = {"키": "FX1", "이름": "USD", "규격": "2026-08-14", "단위": "원/USD", "값": 1414.9}
assert call("elementOf", "환율", fx)["name"] == "USD"
oil = {
"키": "MO1",
"이름": "휘발유",
"규격": "2026-08-14",
"상세구분": "서울",
"단위": "원/L",
"값": 1900,
}
assert call("elementOf", "유가전력", oil)["name"] == "휘발유 서울"