From e62bf9463b16d4685c0948c7e88f6f02b4917bf0 Mon Sep 17 00:00:00 2001 From: Jakob Schlyter Date: Mon, 13 Jan 2025 10:04:42 +0100 Subject: [PATCH] more tests --- tests/test_api.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_api.py b/tests/test_api.py index 71e2445..e7cd4b0 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -157,6 +157,12 @@ def _test_enroll(data_key: JWK, x509_key: PrivateKey, requested_name: str | None assert response.status_code == status.HTTP_200_OK node_certificate = response.json() print(json.dumps(node_certificate, indent=4)) + assert node_certificate["x509_certificate"] == enrollment_response["x509_certificate"] + assert isinstance(node_certificate["x509_certificate_serial_number"], str) + assert node_certificate["x509_certificate_serial_number"] == enrollment_response["x509_certificate_serial_number"] + assert ( + node_certificate["x509_certificate_not_valid_after"] == enrollment_response["x509_certificate_not_valid_after"] + ) ##################### # Get node public key