Skip to content

Commit

Permalink
feat: improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
migueluzcategui committed Sep 5, 2023
1 parent e081318 commit db2cdce
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/api/test_cargo_movement.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ class TestCargoMovement(TestCase):
"dwt": 5260,
"cubic_capacity": 6100,
"vessel_class": "tiny_tanker",
"classes": [
{"id": "vlcc_plus", "label": "VLCC+", "layer": "legacy"},
{"id": "oil", "label": "Oil Tankers", "layer": "group"},
{"id": "oil_vlcc", "label": "VLCC+", "layer": "coarse"},
{"id": "oil_vlcc", "label": "VLCC+", "layer": "granular"},
],
"corporate_entities": [
{
"id": "f9bd45e65e292909a7b751b0026dcf7795c6194b3c0712910a241caee32c99b8",
Expand Down Expand Up @@ -156,6 +162,18 @@ def test_convert_to_flat_dict(self):
"vessels.0.start_timestamp": "2019-10-18T21:38:34+0000",
"vessels.0.status": "vessel_status_laden_known",
"vessels.0.vessel_class": "tiny_tanker",
"vessels.0.classes.0.id": "vlcc_plus",
"vessels.0.classes.0.layer": "legacy",
"vessels.0.classes.0.label": "VLCC+",
"vessels.0.classes.1.id": "oil",
"vessels.0.classes.1.layer": "group",
"vessels.0.classes.1.label": "Oil Tankers",
"vessels.0.classes.2.id": "oil_vlcc",
"vessels.0.classes.2.layer": "coarse",
"vessels.0.classes.2.label": "VLCC+",
"vessels.0.classes.3.id": "oil_vlcc",
"vessels.0.classes.3.layer": "granular",
"vessels.0.classes.3.label": "VLCC+",
"vessels.0.scrubber": None,
"vessels.0.flag": None,
"vessels.0.voyage_id": "401f0e74fc42401248a484aca2e9955dea885378796f7f4d0bc8e92c35ea270a",
Expand Down
46 changes: 46 additions & 0 deletions tests/endpoints/test_vessels_search_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,52 @@ def test_to_df(self):
"corporate_entities": {0: [], 1: []},
"leaf": {0: True, 1: True},
"vessel_class": {0: "tiny_tanker", 1: "tiny_tanker"},
"classes": {
0: [
{
"id": "vlcc_plus",
"label": "VLCC+",
"layer": "legacy",
},
{
"id": "oil",
"label": "Oil Tankers",
"layer": "group",
},
{
"id": "oil_vlcc",
"label": "VLCC+",
"layer": "coarse",
},
{
"id": "oil_vlcc",
"label": "VLCC+",
"layer": "granular",
},
],
1: [
{
"id": "vlcc_plus",
"label": "VLCC+",
"layer": "legacy",
},
{
"id": "oil",
"label": "Oil Tankers",
"layer": "group",
},
{
"id": "oil_vlcc",
"label": "VLCC+",
"layer": "coarse",
},
{
"id": "oil_vlcc",
"label": "VLCC+",
"layer": "granular",
},
],
},
"cubic_capacity": {0: 7060, 1: 6318},
"tags": {
0: [
Expand Down

0 comments on commit db2cdce

Please sign in to comment.