Skip to content

Commit

Permalink
Update test_api_v1.py
Browse files Browse the repository at this point in the history
  • Loading branch information
michplunkett committed Dec 20, 2024
1 parent 9a1fe2f commit 2f50bb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions OpenOversight/tests/routes/test_api_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_get_dept_attributes(client, session, department_id: int):

# Get assignments
expected_assignments = (
session.get(Assignment)
session.query(Assignment)
.join(Assignment.base_officer)
.filter(Officer.department_id == department_id)
.options(contains_eager(Assignment.base_officer))
Expand Down Expand Up @@ -55,7 +55,7 @@ def test_get_dept_attributes(client, session, department_id: int):
)
incidents = json.loads(resp_incidents.data.decode(ENCODING_UTF_8))

assert resp_assignments.status_code == HTTPStatus.OK
assert resp_incidents.status_code == HTTPStatus.OK
assert len(incidents) == expected_incidents

# Get salaries
Expand All @@ -73,5 +73,5 @@ def test_get_dept_attributes(client, session, department_id: int):
)
salaries = json.loads(resp_salaries.data.decode(ENCODING_UTF_8))

assert resp_assignments.status_code == HTTPStatus.OK
assert resp_salaries.status_code == HTTPStatus.OK
assert len(salaries) == expected_salaries

0 comments on commit 2f50bb9

Please sign in to comment.