1
0
mirror of https://github.com/laurivosandi/certidude synced 2025-09-06 13:51:12 +00:00

tests: Attempt to catch CRL export errors

This commit is contained in:
2017-05-01 20:40:22 +00:00
parent e228963bd2
commit ffdcbcc41a
2 changed files with 13 additions and 9 deletions

View File

@@ -199,14 +199,6 @@ def test_cli_setup_authority():
assert r.status_code == 415
# Test revocations API call
r = client().simulate_get("/api/revoked/")
assert r.status_code == 200
assert r.headers.get('content-type') == "application/x-pkcs7-crl"
r = requests.get("http://ca.example.lan/api/revoked/")
assert r.status_code == 200
assert r.headers.get('content-type') == "application/x-pkcs7-crl"
r = client().simulate_get("/api/revoked/",
headers={"Accept":"application/x-pem-file"})
assert r.status_code == 200
@@ -217,6 +209,14 @@ def test_cli_setup_authority():
assert r.status_code == 200
assert r.headers.get('content-type') == "application/x-pem-file"
r = client().simulate_get("/api/revoked/")
assert r.status_code == 200
assert r.headers.get('content-type') == "application/x-pkcs7-crl"
r = requests.get("http://ca.example.lan/api/revoked/")
assert r.status_code == 200
assert r.headers.get('content-type') == "application/x-pkcs7-crl"
r = client().simulate_get("/api/revoked/",
headers={"Accept":"text/plain"})
assert r.status_code == 415