Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 17, 2023
1 parent a2376d4 commit f577c60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/tests/test_national.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def test_get_national_forecast(db_session, api_client):
!= national_forecast.forecast_values[0].expected_power_generation_megawatts * 0.9
)


def test_get_national_forecast_null_plevels(db_session, api_client):
"""Check main solar/GB/national/forecast route works"""

Expand All @@ -154,12 +155,11 @@ def test_get_national_forecast_null_plevels(db_session, api_client):
national_forecast = NationalForecast(**response.json())
assert national_forecast.forecast_values[0].plevels is not None
assert (
national_forecast.forecast_values[0].plevels["plevel_10"]
== national_forecast.forecast_values[0].expected_power_generation_megawatts * 0.8
national_forecast.forecast_values[0].plevels["plevel_10"]
== national_forecast.forecast_values[0].expected_power_generation_megawatts * 0.8
)



def test_read_latest_national_values_start_and_end_filters_include_metadata(db_session, api_client):
"""Check main solar/GB/national/forecast route works"""

Expand Down
1 change: 0 additions & 1 deletion src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ def format_plevels(national_forecast_value: NationalForecastValue):
# rename '10' and '90' to plevel_10 and plevel_90
for c in ["10", "90"]:
if c in national_forecast_value.plevels.keys():

# get value
value = national_forecast_value.plevels.pop(c)

Expand Down

0 comments on commit f577c60

Please sign in to comment.