Przeglądaj źródła

test: expect recharge type fuel label to display as 油卡.

Co-authored-by: Cursor <cursoragent@cursor.com>
wuzilong 2 tygodni temu
rodzic
commit
658bd3df5c
1 zmienionych plików z 8 dodań i 1 usunięć
  1. 8 1
      backend/tests/test_vehicle_recharge_types.py

+ 8 - 1
backend/tests/test_vehicle_recharge_types.py

@@ -1,4 +1,4 @@
-"""车辆充值类型:ETC + 加油。"""
+"""车辆充值类型:ETC + 油卡(存值 fuel)。"""
 from __future__ import annotations
 
 import pytest
@@ -58,3 +58,10 @@ def test_record_create_accepts_fuel():
         }
     )
     assert obj.recharge_type == "fuel"
+
+
+def test_recharge_type_labels_fuel_displays_as_oil_card():
+    from app.api.pl.vehicle_recharge import RECHARGE_TYPE_LABELS
+
+    assert RECHARGE_TYPE_LABELS["etc"] == "ETC"
+    assert RECHARGE_TYPE_LABELS["fuel"] == "油卡"