Skip to content

Commit

Permalink
Test: fix assertions with corrected attribute names
Browse files Browse the repository at this point in the history
  • Loading branch information
fjugipe committed Feb 8, 2024
1 parent 89c59b8 commit e87e51a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions api/test/test_edr.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ def test_get_locations_id_with_single_parameter_query_without_format():
mock_getObsRequest.assert_called_once()
assert "ff" in mock_getObsRequest.call_args[0][0].filter["instrument"].values
assert "06260" in mock_getObsRequest.call_args[0][0].filter["platform"].values
assert "2022-12-31 00:00:00" == mock_getObsRequest.call_args[0][0].interval.start.ToDatetime().strftime(
"%Y-%m-%d %H:%M:%S"
)
assert "2022-12-31 01:00:01" == mock_getObsRequest.call_args[0][0].interval.end.ToDatetime().strftime(
assert "2022-12-31 00:00:00" == mock_getObsRequest.call_args[0][
0
].temporal_interval.start.ToDatetime().strftime("%Y-%m-%d %H:%M:%S")
assert "2022-12-31 01:00:01" == mock_getObsRequest.call_args[0][0].temporal_interval.end.ToDatetime().strftime(
"%Y-%m-%d %H:%M:%S"
)

Expand Down Expand Up @@ -101,12 +101,12 @@ def test_get_area_with_normal_query():
# Check that getObsRequest gets called with correct arguments given in query
mock_getObsRequest.assert_called_once()
assert "TA_P1D_AVG" in mock_getObsRequest.call_args[0][0].filter["instrument"].values
assert len(mock_getObsRequest.call_args[0][0].inside.points) == 5
assert 22.12 == mock_getObsRequest.call_args[0][0].inside.points[0].lon
assert "2022-12-31 00:00:00" == mock_getObsRequest.call_args[0][0].interval.start.ToDatetime().strftime(
"%Y-%m-%d %H:%M:%S"
)
assert "2022-12-31 01:00:01" == mock_getObsRequest.call_args[0][0].interval.end.ToDatetime().strftime(
assert len(mock_getObsRequest.call_args[0][0].spatial_area.points) == 5
assert 22.12 == mock_getObsRequest.call_args[0][0].spatial_area.points[0].lon
assert "2022-12-31 00:00:00" == mock_getObsRequest.call_args[0][
0
].temporal_interval.start.ToDatetime().strftime("%Y-%m-%d %H:%M:%S")
assert "2022-12-31 01:00:01" == mock_getObsRequest.call_args[0][0].temporal_interval.end.ToDatetime().strftime(
"%Y-%m-%d %H:%M:%S"
)

Expand Down

1 comment on commit e87e51a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API Unit Test Coverage Report
FileStmtsMissCoverMissing
\_\_init\_\_.py00100% 
datastore_pb2.py584621%23–68
datastore_pb2_grpc.py432347%37–52, 85–87, 92–94, 99–101, 106–108, 112–136, 174, 191, 208, 225
dependencies.py31487%23–24, 31, 38
grpc_getter.py8450%12–16
locustfile.py15150%1–31
main.py22386%27, 37, 47
metadata_endpoints.py19479%16, 33–66, 70
formatters
   \_\_init\_\_.py120100% 
   base_formatter.py7186%18
   covjson.py52198%69
routers
   \_\_init\_\_.py00100% 
   edr.py54787%33–56
   records.py00100% 
test
   test_covjson.py600100% 
   test_edr.py920100% 
TOTAL47310877% 

API Unit Test Coverage Summary

Tests Skipped Failures Errors Time
15 0 💤 0 ❌ 0 🔥 1.564s ⏱️

Please sign in to comment.