diff --git a/packages/pipe-vms-ingestion/tests/vms_ingestion/normalization/feeds/data/raw_blz.json b/packages/pipe-vms-ingestion/tests/vms_ingestion/normalization/feeds/data/raw_blz.json index 406623f..c2ed5b8 100644 --- a/packages/pipe-vms-ingestion/tests/vms_ingestion/normalization/feeds/data/raw_blz.json +++ b/packages/pipe-vms-ingestion/tests/vms_ingestion/normalization/feeds/data/raw_blz.json @@ -7,7 +7,7 @@ "imo": "789123456", "callsign": null, "name": "ERTYUIO", - "mmsi": null, + "mmsi": "312312209", "lon": 1.840367, "timestamp": "2024-01-01 21:50:21+00:00", "lat": -35.561983 @@ -20,7 +20,7 @@ "imo": null, "callsign": null, "name": "ZAIRA", - "mmsi": null, + "mmsi": "312312229", "lon": -47.32655, "timestamp": "2024-01-01 12:08:35+00:00", "lat": 6.4383 @@ -33,7 +33,7 @@ "imo": null, "callsign": null, "name": "ZAIRA", - "mmsi": null, + "mmsi": "312312229", "lon": -47.3742, "timestamp": "2024-01-01 12:31:00+00:00", "lat": 6.451333 @@ -46,7 +46,7 @@ "imo": "9876543", "callsign": null, "name": "EUGENIA", - "mmsi": "31231231", + "mmsi": "312312319", "lon": -21.080833, "timestamp": "2024-01-01 17:45:54+00:00", "lat": 13.857133 diff --git a/packages/pipe-vms-ingestion/tests/vms_ingestion/normalization/feeds/test_blz_normalize.py b/packages/pipe-vms-ingestion/tests/vms_ingestion/normalization/feeds/test_blz_normalize.py index 0a2a390..2b50a3d 100644 --- a/packages/pipe-vms-ingestion/tests/vms_ingestion/normalization/feeds/test_blz_normalize.py +++ b/packages/pipe-vms-ingestion/tests/vms_ingestion/normalization/feeds/test_blz_normalize.py @@ -46,12 +46,13 @@ class TestBLZNormalize(unittest.TestCase): "course": None, "destination": None, "heading": None, - "flag": None, + "flag": "BLZ", "imo": None, "ingested_at": None, "lat": -35.561983, "length": None, "lon": 1.840367, + "mmsi": "312312209", "msgid": "935f98d55704bc12ef6f645883751dd09a90a25c7eb58fd5babd864c687ea019", "received_at": datetime(2024, 1, 1, 22, 15, 19, tzinfo=timezone.utc), "receiver": None, @@ -79,12 +80,13 @@ class TestBLZNormalize(unittest.TestCase): "course": None, "destination": None, "heading": None, - "flag": None, + "flag": "BLZ", "imo": None, "ingested_at": None, "lat": 6.4383, "length": None, "lon": -47.32655, + "mmsi": "312312229", "msgid": "a74eb2931b88b1d3c074f8c44e2262c9d16761271c7ccaf815e37517ab38f0b3", "received_at": datetime(2024, 1, 1, 13, 15, 22, tzinfo=timezone.utc), "receiver": None, @@ -112,12 +114,13 @@ class TestBLZNormalize(unittest.TestCase): "course": 285.39249139403387, "destination": None, "heading": None, - "flag": None, + "flag": "BLZ", "imo": None, "ingested_at": None, "lat": 6.451333, "length": None, "lon": -47.3742, + "mmsi": "312312229", "msgid": "5435473036df2a6e75c43e60e5a27a4cd1f16916f4ca851bb23b409214ff4b94", "received_at": datetime(2024, 1, 1, 13, 15, 21, tzinfo=timezone.utc), "receiver": None, @@ -145,12 +148,13 @@ class TestBLZNormalize(unittest.TestCase): "course": None, "destination": None, "heading": None, - "flag": None, + "flag": "BLZ", "imo": "9876543", "ingested_at": None, "lat": 13.857133, "length": None, "lon": -21.080833, + "mmsi": "312312319", "msgid": "70a8ff7081d9836488d278058004742b2bba4b6086e0b62a9d64b8fcfa3b8616", "received_at": datetime(2024, 1, 1, 18, 15, 22, tzinfo=timezone.utc), "receiver": None, diff --git a/packages/pipe-vms-ingestion/tests/vms_ingestion/normalization/transforms/test_blz_map_source_message.py b/packages/pipe-vms-ingestion/tests/vms_ingestion/normalization/transforms/test_blz_map_source_message.py index b995c65..d7346ac 100644 --- a/packages/pipe-vms-ingestion/tests/vms_ingestion/normalization/transforms/test_blz_map_source_message.py +++ b/packages/pipe-vms-ingestion/tests/vms_ingestion/normalization/transforms/test_blz_map_source_message.py @@ -7,9 +7,7 @@ from apache_beam.testing.util import assert_that from tests.util import pcol_equal_to from vms_ingestion.normalization import build_pipeline_options_with_defaults -from vms_ingestion.normalization.transforms.blz_map_source_message import ( - BLZMapSourceMessage, -) +from vms_ingestion.normalization.transforms.blz_map_source_message import BLZMapSourceMessage class TestBLZMapSourceMessage(unittest.TestCase): @@ -32,7 +30,7 @@ class TestBLZMapSourceMessage(unittest.TestCase): "imo": "789123456", "callsign": None, "name": "ERTYUIO", - "mmsi": None, + "mmsi": "312312312", "lon": 1.840367, "timestamp": datetime.fromisoformat("2024-01-01 21:50:21+00:00"), "lat": -35.561983, @@ -45,8 +43,10 @@ class TestBLZMapSourceMessage(unittest.TestCase): "callsign": None, "course": None, "imo": "789123456", + "flag": "BLZ", "lat": -35.561983, "lon": 1.840367, + "mmsi": "312312312", "received_at": datetime(2024, 1, 1, 22, 15, 19, tzinfo=timezone.utc), "shipname": "ERTYUIO", "shiptype": None,