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
+13
View File
@@ -55,3 +55,16 @@ def test_model_strips_unit_model_prefixes_for_dead_matching():
assert bob["units"][0]["dead"] is True
assert bob["units"][0]["unit_type"] == "tank"
assert bob["units"][0]["unit_class"] == "medium tank"
def test_model_ignores_spectra_unit_normalized_for_vehicle_name():
game = _game()
game["players"]["1"]["units"][0]["unit"] = "germ_pzkpfw_V_ausf_d_panther"
game["players"]["1"]["units"][0]["unit_normalized"] = "Bad Spectra Name"
model = build_scoreboard_model(game, "<English>")
assert model is not None
alice = model["teams"][0]["players"][0]
assert alice["units"][0]["internal"] == "germ_pzkpfw_V_ausf_d_panther"
assert alice["units"][0]["name"] == "Panther D"