pki.tests.fixturesยถ

Fixtures for the PKI pytest suite.

Functionsยถ

self_signed_cert_basic(rsa_private_key)

Creates a self-signed CA certificate with minimal extensions and saves it to the database once per module.

self_signed_cert_with_ext(rsa_private_key)

Create a self-signed certificate with multiple extensions.

Module Contentsยถ

pki.tests.fixtures.self_signed_cert_basic(rsa_private_key)[source]ยถ

Creates a self-signed CA certificate with minimal extensions and saves it to the database once per module.

We manually unblock the DB because this fixture has โ€˜moduleโ€™ scope.

Parameters:

rsa_private_key (cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey)

Return type:

tuple[pki.models.certificate.CertificateModel, cryptography.x509.Certificate]

pki.tests.fixtures.self_signed_cert_with_ext(rsa_private_key)[source]ยถ

Create a self-signed certificate with multiple extensions.

Parameters:

rsa_private_key (cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey)

Return type:

cryptography.x509.Certificate