Skip to content

Commit

Permalink
Fix last missing coverage in main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewLester committed Apr 24, 2023
1 parent e524772 commit b0098d2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_inverters.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ def test_post_inverters_for_site(client, sites, httpx_mock):
assert response.json()["inverters"][0]["id"] == test_inverter_client_id


def test_post_inverters_for_nonexistant_site(client, sites):
nonexistant_site_uuid = "1cd11139-790a-46c0-8849-0c7c8e810ba5"
test_inverter_client_id = "6c078ca2-2e75-40c8-9a7f-288bd0b70065"
json = [test_inverter_client_id]
response = client.post(f"/sites/{nonexistant_site_uuid}/inverters", json=json)
assert response.status_code == 404


def test_get_inverters_for_site_fake(client, sites, inverters, fake):
response = client.get(f"/sites/{sites[0].site_uuid}/inverters")
assert response.status_code == 200
Expand Down

0 comments on commit b0098d2

Please sign in to comment.