est.tests.test_est_interfaceΒΆ

Tests for the EST interface endpoints.

FunctionsΒΆ

request_factory()

est_simple_enrollment_view()

est_cacerts_view()

get_mock_truststore(certificates)

Get a mock truststore for testing.

test_get_credential_for_certificate(mock_get, mock_filter)

Test the get_credential_for_certificate method.

test_authenticate_username_password_success(...)

test_authenticate_username_password_missing_header(...)

test_post_authentication_failure(mock_auth, ...)

test_issue_credential_invalid_template(mock_issue, ...)

test_tls_client_cert_verification_no_cert(...)

Tests the TLS client certificate verification if no valid PEM is passed.

test_tls_client_cert_domain_credential_enrollment()

Tests that an issued credential can be enrolled via EST simpleenroll using an IDevID.

test_tls_client_cert_enrollment_twice()

Tests that the same domain credential cannot be enrolled twice via EST simpleenroll using an IDevID.

test_tls_client_cert_application_credential_enrollment()

Tests that an application credential cannot directly be enrolled via EST simpleenroll using an IDevID.

test_tls_reenrollment_valid()

Tests that an issued credential can be re-enrolled via EST simplereenroll.

test_tls_reenrollment_mismatched()

Tests that an issued credential cannot be re-enrolled if the TLS client cert does not match the issued cred.

Module ContentsΒΆ

est.tests.test_est_interface.request_factory()[source]ΒΆ
est.tests.test_est_interface.est_simple_enrollment_view()[source]ΒΆ
est.tests.test_est_interface.est_cacerts_view()[source]ΒΆ
est.tests.test_est_interface.get_mock_truststore(certificates)[source]ΒΆ

Get a mock truststore for testing.

Parameters:

certificates (list[cryptography.x509.Certificate])

Return type:

unittest.mock.MagicMock

est.tests.test_est_interface.test_get_credential_for_certificate(mock_get, mock_filter)[source]ΒΆ

Test the get_credential_for_certificate method.

Return type:

None

est.tests.test_est_interface.test_authenticate_username_password_success(mock_filter, request_factory, est_simple_enrollment_view)[source]ΒΆ
est.tests.test_est_interface.test_authenticate_username_password_missing_header(request_factory, est_simple_enrollment_view)[source]ΒΆ
est.tests.test_est_interface.test_post_authentication_failure(mock_auth, mock_extract_domain, request_factory, est_simple_enrollment_view)[source]ΒΆ
est.tests.test_est_interface.test_issue_credential_invalid_template(mock_issue, est_simple_enrollment_view)[source]ΒΆ
est.tests.test_est_interface.test_tls_client_cert_verification_no_cert(est_simple_enrollment_view)[source]ΒΆ

Tests the TLS client certificate verification if no valid PEM is passed.

Return type:

None

est.tests.test_est_interface.test_tls_client_cert_domain_credential_enrollment()[source]ΒΆ

Tests that an issued credential can be enrolled via EST simpleenroll using an IDevID.

Return type:

None

est.tests.test_est_interface.test_tls_client_cert_enrollment_twice()[source]ΒΆ

Tests that the same domain credential cannot be enrolled twice via EST simpleenroll using an IDevID.

Return type:

None

est.tests.test_est_interface.test_tls_client_cert_application_credential_enrollment()[source]ΒΆ

Tests that an application credential cannot directly be enrolled via EST simpleenroll using an IDevID.

Return type:

None

est.tests.test_est_interface.test_tls_reenrollment_valid()[source]ΒΆ

Tests that an issued credential can be re-enrolled via EST simplereenroll.

Return type:

None

est.tests.test_est_interface.test_tls_reenrollment_mismatched()[source]ΒΆ

Tests that an issued credential cannot be re-enrolled if the TLS client cert does not match the issued cred.

For this example, it is attempted to re-enroll a domain credential with an application credential.

Return type:

None