Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Jan 27, 2025
1 parent 425e1d6 commit eb4260a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tests/test_gsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test_read_latest_all_gsp(db_session, api_client):

r = ManyForecasts(**response.json())
assert len(r.forecasts) == 10
assert len(r.forecasts[0].forecast_values) == 16
assert 16 <= len(r.forecasts[0].forecast_values) <= 17


def test_read_latest_all_gsp_filter_gsp(db_session, api_client):
Expand All @@ -139,7 +139,7 @@ def test_read_latest_all_gsp_filter_gsp(db_session, api_client):

r = ManyForecasts(**response.json())
assert len(r.forecasts) == 3
assert len(r.forecasts[0].forecast_values) == 16
assert 16 <= len(r.forecasts[0].forecast_values) <= 17


def test_read_latest_gsp_id_greater_than_total(db_session, api_client):
Expand Down Expand Up @@ -217,7 +217,7 @@ def test_read_latest_all_gsp_historic(db_session, api_client):
r = ManyForecasts(**response.json())

assert len(r.forecasts) == 9 # dont get national
assert len(r.forecasts[0].forecast_values) == 16
assert 16 <= len(r.forecasts[0].forecast_values) <= 17
assert r.forecasts[0].forecast_values[0].expected_power_generation_megawatts <= 13000
assert r.forecasts[1].forecast_values[0].expected_power_generation_megawatts <= 10

Expand Down Expand Up @@ -245,7 +245,7 @@ def test_read_latest_all_gsp_historic_compact(db_session, api_client):

r = [OneDatetimeManyForecastValues(**f) for f in response.json()]

assert len(r) == 16
assert 16 <= len(r) <= 17
assert len(r[0].forecast_values) == 9 # dont get the national
assert r[0].forecast_values[1] <= 13000

Expand Down

0 comments on commit eb4260a

Please sign in to comment.