Skip to content

Commit

Permalink
Fix blz_normalize and test_blz_map_source_message tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rdgfuentes committed Nov 29, 2024
1 parent bcc5a8f commit 474b196
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 474b196

Please sign in to comment.