Skip to content

Commit 684e54b

Browse files
committed
test(converter): add distributionID checks on cisu to rs cases
1 parent 56f6be1 commit 684e54b

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

converter/tests/cisu/test_resources_info_converter.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ def test_from_cisu_to_rs_new_case_id():
237237
assert "resourcesInfo" in first_message, (
238238
"first message must be a RS-RI (resourcesInfo key expected)"
239239
)
240+
assert results[0]["distributionID"] == RC_RI_WITH_POSITION_EDXL["distributionID"], (
241+
"Converted RS-RI doesn't have the same distributionID as original RC-RI"
242+
)
240243

241244
for i, rs_sr in enumerate(results[1:], start=1):
242245
message = get_edxl_message(rs_sr)
@@ -393,6 +396,10 @@ def test_from_cisu_to_rs_known_case_id_status_changed_only():
393396

394397
assert isinstance(results, list), "from_cisu_to_rs must return a list"
395398
assert len(results) == 1, f"expected 1 RS-SR, got {len(results)}"
399+
assert results[0]["distributionID"] == RC_RI_WITH_POSITION_EDXL["distributionID"], (
400+
"Converted RS-SR doesn't have the same distributionID as original RC-RI"
401+
)
402+
396403
message = get_edxl_message(results[0])
397404
assert "resourcesStatus" in message, "expected RS-SR (resourcesStatus key)"
398405
assert "resourcesInfo" not in message, (
@@ -421,6 +428,9 @@ def test_from_cisu_to_rs_known_case_id_resource_added():
421428

422429
assert isinstance(results, list), "from_cisu_to_rs must return a list"
423430
assert len(results) == 2, f"expected RS-RI + RS-SR, got {len(results)}"
431+
assert results[0]["distributionID"] == RC_RI_WITH_POSITION_EDXL["distributionID"], (
432+
"Converted RS-RI doesn't have the same distributionID as original RC-RI"
433+
)
424434

425435
first_message = get_edxl_message(results[0])
426436
assert "resourcesInfo" in first_message, (

0 commit comments

Comments
 (0)