Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: 404 after credential deleted (no 500) #331

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading