Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Dec 1, 2023
1 parent a9bd013 commit 7d1314b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pv_site_api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def get_pv_actual_many_sites(
return []

# convert to list of strings
if isinstance(site_uuids,str)
if isinstance(site_uuids,str):
site_uuids_list = site_uuids.split(",")
else:
site_uuids_list = site_uuids
Expand Down
3 changes: 2 additions & 1 deletion tests/test_forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ def test_get_forecast_no_data(db_session, client, sites):
def test_get_forecast_no_data_multiple_sites(db_session, client):
# Get forecasts from that site with no forecasts.
resp = client.get("/sites/pv_forecast?site_uuids=[]")
assert resp.status_code == 204
assert resp.status_code == 200
assert resp.json() == []


def test_get_forecast_user_no_access(db_session, client, sites):
Expand Down
3 changes: 2 additions & 1 deletion tests/test_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ def test_pv_actual_no_data(db_session, client, sites):
def test_pv_actual_no_data_multiple_sites(db_session, client):
# Get forecasts from that site with no actuals.
resp = client.get("/sites/pv_actual?site_uuids=[]")
assert resp.status_code == 204
assert resp.status_code == 200
assert resp.json() == []


def test_pv_actual_404(db_session, client):
Expand Down

0 comments on commit 7d1314b

Please sign in to comment.