Skip to content

Commit

Permalink
test: 404 after credential deleted (no 500) (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
iFergal authored Dec 9, 2024
1 parent 9107d02 commit fcff924
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/app/test_credentialing.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,15 @@ def test_credentialing_ends(helpers, seeder):
res = client.simulate_delete(f"/credentials/{saids[0]}")
assert res.status_code == 204

res = client.simulate_get(f"/credentials/{saids[0]}")
assert res.status_code == 404
assert res.json == {'description': f"credential for said EIO9uC3K6MvyjFD-RB3RYW3dfL49kCyz3OPqv3gi1dek not found.",
'title': '404 Not Found'}

res = client.simulate_post(f"/credentials/query")
assert res.status_code == 200
assert len(res.json) == 4

# Check db directly to make sure all indices are gone too (GET endpoints don't cover all indices)
assert agent.rgy.reger.creds.get(keys=saids[0]) is None
assert agent.rgy.reger.cancs.get(keys=saids[0]) is None
Expand Down

0 comments on commit fcff924

Please sign in to comment.