mirror of
https://github.com/laurivosandi/certidude
synced 2025-09-06 13:51:12 +00:00
Add tests for non-existant certificate
This commit is contained in:
@@ -77,6 +77,9 @@ def test_cli_setup_authority():
|
||||
|
||||
|
||||
# Test signed certificate API call
|
||||
r = client().simulate_get("/api/signed/nonexistant")
|
||||
assert r.status_code == 404
|
||||
|
||||
r = client().simulate_get("/api/signed/test2")
|
||||
assert r.status_code == 200
|
||||
assert r.headers.get('content-type') == "application/x-pem-file"
|
||||
@@ -85,6 +88,9 @@ def test_cli_setup_authority():
|
||||
assert r.status_code == 200
|
||||
assert r.headers.get('content-type') == "application/json"
|
||||
|
||||
r = client().simulate_get("/api/signed/test2", headers={"Accept":"text/plain"})
|
||||
assert r.status_code == 415
|
||||
|
||||
|
||||
# Test revocations API call
|
||||
r = client().simulate_get("/api/revoked")
|
||||
|
Reference in New Issue
Block a user