Skip to content

Commit

Permalink
test: tasks detail endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed May 17, 2024
1 parent c772412 commit 1425399
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_task_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,12 @@ async def test_task_routes(test_client: TestClient, aioresponse: aioresponses, d
assert len(rd) == 1
assert rd[0]["genome_id"] == SARS_COV_2_GENOME_ID
assert rd[0]["status"] == "queued"

aioresponse.post("https://authz.local/policy/evaluate", payload={"result": [[True]]})
res = test_client.get(f"/tasks/{rd[0]['id']}", headers=AUTHORIZATION_HEADER)
rd2 = res.json()
assert rd[0] == rd2

aioresponse.post("https://authz.local/policy/evaluate", payload={"result": [[True]]})
res = test_client.get(f"/tasks/0", headers=AUTHORIZATION_HEADER)
assert res.status_code == 404

0 comments on commit 1425399

Please sign in to comment.