Skip to content

Commit

Permalink
Fix tests: add mock for new func
Browse files Browse the repository at this point in the history
  • Loading branch information
GratienDSX committed Jan 9, 2025
1 parent ecb0c6f commit 6f314ae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_forecasts.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@ def test_get_coverage_file(self, mock_get_request, mock_get_capabilities):
@patch("meteole._arome.AromeForecast.get_capabilities")
@patch("meteole._arome.AromeForecast._transform_grib_to_df")
@patch("meteole._arome.AromeForecast._get_coverage_file")
def test_get_data_single_forecast(self, mock_get_coverage_file, mock_transform_grib_to_df, mock_get_capabilities):
@patch("meteole._arome.AromeForecast._remove_coverage_files")
def test_get_data_single_forecast(
self, mock_remove_coverage_files, mock_get_coverage_file, mock_transform_grib_to_df, mock_get_capabilities
):
mock_transform_grib_to_df.return_value = pd.DataFrame({"data": [1, 2, 3]})

forecast = AromeForecast(
Expand All @@ -210,8 +213,9 @@ def test_get_data_single_forecast(self, mock_get_coverage_file, mock_transform_g
@patch("meteole._arome.AromeForecast.get_capabilities")
@patch("meteole._arome.AromeForecast._transform_grib_to_df")
@patch("meteole._arome.AromeForecast._get_coverage_file")
@patch("meteole._arome.AromeForecast._remove_coverage_files")
def test_get_data_single_forecast_with_height(
self, mock_get_coverage_file, mock_transform_grib_to_df, mock_get_capabilities
self, mock_remove_coverage_files, mock_get_coverage_file, mock_transform_grib_to_df, mock_get_capabilities
):
mock_transform_grib_to_df.return_value = pd.DataFrame({"data": [1, 2, 3], "heightAboveGround": ["2", "2", "2"]})

Expand Down

0 comments on commit 6f314ae

Please sign in to comment.