fix some scoreboard shit (#1364)

This commit is contained in:
NotSoToothless
2026-06-30 07:22:13 -07:00
committed by GitHub
parent c417226e9e
commit cfd2458ab3
4 changed files with 81 additions and 3 deletions
+21
View File
@@ -0,0 +1,21 @@
import importlib
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "SHARED"))
def test_unit_vehicle_fields_translates_vehicle_and_strips_model_prefix(tmp_path, monkeypatch):
monkeypatch.setenv("STORAGE_VOL_PATH", str(tmp_path))
import BOT.storage as storage
importlib.reload(storage)
unit = {
"unit": "tankModels/germ_pzkpfw_V_ausf_d_panther",
"unit_normalized": "Bad Spectra Name",
"used": True,
}
assert storage._unit_vehicle_fields(unit) == ("Panther D", "germ_pzkpfw_V_ausf_d_panther")