fix some scoreboard shit (#1364)
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user