test: fix vehicle recharge apply fixtures for required fields.

Schema now requires odometerKm and attachmentUrls; update type tests so the suite stays green.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wuzilongandCursor committed 2026-10-16 11:40:12 +08:00
1 parent a3a32ccaaa
commit a5976350ab
1 file changed
+6
@@ -21,6 +21,8 @@ def test_apply_create_accepts_fuel():
"licensePlate": "鄂A12345",
"rechargeType": "fuel",
"applyDate": "2026-09-12",
"odometerKm": "1000",
"attachmentUrls": "pl/vehicle-recharge/a.jpg",
}
)
assert obj.recharge_type == "fuel"
@@ -32,6 +34,8 @@ def test_apply_create_accepts_etc():
"licensePlate": "鄂A12345",
"rechargeType": "etc",
"applyDate": "2026-09-12",
"odometerKm": "1000",
"attachmentUrls": "pl/vehicle-recharge/a.jpg",
}
)
assert obj.recharge_type == "etc"
@@ -44,6 +48,8 @@ def test_apply_create_rejects_unknown_type():
"licensePlate": "鄂A12345",
"rechargeType": "other",
"applyDate": "2026-09-12",
"odometerKm": "1000",
"attachmentUrls": "pl/vehicle-recharge/a.jpg",
}
)