Skip to content

Commit aa1fcb1

Browse files
committed
test(converter): add vehicleType translation cases
1 parent 7163236 commit aa1fcb1

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

converter/tests/cisu/test_resources_info_converter.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,14 @@ def test_cisu_to_rs_breaking_changes():
162162
@pytest.mark.parametrize(
163163
"rs_vehicule_type,expected",
164164
[
165-
pytest.param("SIS", "SIS", id="translates SIS to SIS"),
166-
pytest.param("SIS.DRAGON", "SIS", id="translates SIS.DRAGON to SIS"),
167-
pytest.param("SMUR", "SMUR", id="translates SMUR to SMUR"),
168-
pytest.param("SMUR.VLM", "SMUR", id="translates SMUR.VLM to SMUR"),
165+
pytest.param("SIS", "VECTEUR_SANTE", id="translates SIS to VECTEUR_SANTE"),
166+
pytest.param(
167+
"SIS.DRAGON", "VECTEUR_SANTE", id="translates SIS.DRAGON to VECTEUR_SANTE"
168+
),
169+
pytest.param("SMUR", "VECTEUR_SANTE", id="translates SMUR to VECTEUR_SANTE"),
170+
pytest.param(
171+
"SMUR.VLM", "VECTEUR_SANTE", id="translates SMUR.VLM to VECTEUR_SANTE"
172+
),
169173
],
170174
)
171175
def test_translate_vehicule_type_to_cisu(rs_vehicule_type, expected):
@@ -175,17 +179,17 @@ def test_translate_vehicule_type_to_cisu(rs_vehicule_type, expected):
175179

176180

177181
@pytest.mark.parametrize(
178-
"rs_vehicule_type",
182+
"rs_vehicule_type,expected",
179183
[
180-
pytest.param("AUTREVEC", id="AUTREVEC is not mappable to CISU"),
181-
pytest.param("FSI.HELIFSI", id="FSI.HELIFSI is not mappable to CISU"),
182-
pytest.param("TSU.VSL", id="TSU.VSL is not mappable to CISU"),
184+
pytest.param("SIS", "SIS", id="translates SIS to SIS"),
185+
pytest.param("VECTEUR_SANTE", "SIS", id="translates VECTEUR_SANTE to SIS"),
186+
pytest.param("unsuported", "SIS", id="translates unsuported to SIS"),
183187
],
184188
)
185-
def test_translate_vehicule_type_to_cisu_raises_on_unmappable(rs_vehicule_type):
189+
def test_translate_vehicule_type_to_samu(rs_vehicule_type, expected):
186190
resource = {"vehicleType": rs_vehicule_type}
187-
with pytest.raises(ConversionError):
188-
ResourcesInfoCISUConverter._translate_to_cisu_vehicle_type(resource)
191+
ResourcesInfoCISUConverter._translate_to_samu_vehicle_type(resource)
192+
assert resource["vehicleType"] == expected
189193

190194

191195
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)