Polish PWA assets, accessible tabs and bulk selection, harden bulk revoke tests
This commit is contained in:
@@ -379,3 +379,25 @@ class BulkRevocationTests(unittest.TestCase):
|
||||
)
|
||||
assert response.status_code == 200
|
||||
assert response.json()["errors"][0]["error"] == "invalid certificate id"
|
||||
|
||||
@async_test
|
||||
async def test_bulk_revoke_validation_and_isolation(self) -> None:
|
||||
async with api_client() as client:
|
||||
with oidc_user("alice"):
|
||||
vault_id = await _vault(client)
|
||||
response = await client.post(
|
||||
f"/api/vaults/{vault_id}/certificates/bulk-revoke",
|
||||
json={"certificate_ids": ["00000000-0000-0000-0000-000000000000"], "reason": "superseded", "invalidity_date": "not-a-date"},
|
||||
)
|
||||
assert response.status_code == 400
|
||||
response = await client.post(
|
||||
f"/api/vaults/{vault_id}/certificates/bulk-revoke",
|
||||
json={"certificate_ids": [str(i) for i in range(201)], "reason": "superseded"},
|
||||
)
|
||||
assert response.status_code == 400
|
||||
with oidc_user("bob"):
|
||||
response = await client.post(
|
||||
f"/api/vaults/{vault_id}/certificates/bulk-revoke",
|
||||
json={"certificate_ids": ["00000000-0000-0000-0000-000000000000"], "reason": "superseded"},
|
||||
)
|
||||
assert response.status_code == 404
|
||||
|
||||
Reference in New Issue
Block a user