setup_wizard.tests.test_tls_credentialΒΆ

Tests for setup_wizard.tls_credential module.

ClassesΒΆ

TestTlsServerCredentialGenerator

Test cases for TlsServerCredentialGenerator class.

Module ContentsΒΆ

class setup_wizard.tests.test_tls_credential.TestTlsServerCredentialGenerator[source]ΒΆ

Test cases for TlsServerCredentialGenerator class.

test_init_with_all_san_types()[source]ΒΆ

Test initialization with IPv4, IPv6, and domain names.

test_init_with_empty_lists()[source]ΒΆ

Test initialization with empty SAN lists.

test_generate_key_pair()[source]ΒΆ

Test static method _generate_key_pair generates EC key.

test_generate_tls_server_credential_basic()[source]ΒΆ

Test generating TLS server credential with basic configuration.

test_generate_tls_server_credential_certificate_properties()[source]ΒΆ

Test the generated certificate has correct properties.

test_generate_tls_server_credential_validity_period()[source]ΒΆ

Test the certificate validity period is approximately 1 year.

test_generate_tls_server_credential_basic_constraints()[source]ΒΆ

Test BasicConstraints extension is set correctly.

test_generate_tls_server_credential_key_usage()[source]ΒΆ

Test KeyUsage extension has correct flags.

test_generate_tls_server_credential_extended_key_usage()[source]ΒΆ

Test ExtendedKeyUsage extension has SERVER_AUTH.

test_generate_tls_server_credential_subject_alternative_name_ipv4_only()[source]ΒΆ

Test SAN extension with IPv4 addresses only.

test_generate_tls_server_credential_subject_alternative_name_ipv6_only()[source]ΒΆ

Test SAN extension with IPv6 addresses only.

test_generate_tls_server_credential_subject_alternative_name_dns_only()[source]ΒΆ

Test SAN extension with DNS names only.

test_generate_tls_server_credential_subject_alternative_name_mixed()[source]ΒΆ

Test SAN extension with mixed IPv4, IPv6, and DNS names.

test_generate_tls_server_credential_subject_key_identifier()[source]ΒΆ

Test SubjectKeyIdentifier extension is present.

test_generate_tls_server_credential_authority_key_identifier()[source]ΒΆ

Test AuthorityKeyIdentifier extension is present.

test_generate_tls_server_credential_private_key_type()[source]ΒΆ

Test the generated private key is EC P-256.

test_generate_tls_server_credential_public_key_matches()[source]ΒΆ

Test certificate public key matches private key.

test_generate_tls_server_credential_serial_number_unique()[source]ΒΆ

Test each generated certificate has unique serial number.

test_generate_tls_server_credential_additional_certificates()[source]ΒΆ

Test additional_certificates contains the certificate itself.

test_generate_tls_server_credential_with_many_sans()[source]ΒΆ

Test generating credential with many SAN entries.

test_generate_tls_server_credential_empty_sans()[source]ΒΆ

Test generating credential with no SAN entries (edge case).