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