management.tests.test_util.test_startup_contextΒΆ

Test suite for StartupContextBuilder.

ClassesΒΆ

StartupContextBuilderTest

Test suite for StartupContextBuilder class.

Module ContentsΒΆ

class management.tests.test_util.test_startup_context.StartupContextBuilderTest(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test suite for StartupContextBuilder class.

setUp()[source]ΒΆ

Set up test fixtures.

test_init()[source]ΒΆ

Test initialization sets default values.

test_with_db_version()[source]ΒΆ

Test setting database version.

test_collect_wizard_state_completed(mock_get_state)[source]ΒΆ

Test collecting wizard state when completed.

test_collect_wizard_state_incomplete(mock_get_state)[source]ΒΆ

Test collecting wizard state when incomplete.

test_collect_wizard_state_runtime_error(mock_get_state)[source]ΒΆ

Test collecting wizard state when RuntimeError occurs.

test_collect_storage_config_no_config()[source]ΒΆ

Test collecting storage config when none exists.

test_collect_storage_config_software()[source]ΒΆ

Test collecting storage config for software storage.

test_collect_storage_config_softhsm()[source]ΒΆ

Test collecting storage config for SoftHSM.

test_collect_storage_config_physical_hsm()[source]ΒΆ

Test collecting storage config for physical HSM.

test_collect_storage_config_exception(mock_first)[source]ΒΆ

Test collecting storage config when exception occurs.

test_collect_dek_state_not_hsm()[source]ΒΆ

Test collecting DEK state for non-HSM configuration.

test_collect_dek_state_no_config()[source]ΒΆ

Test collecting DEK state when no HSM config exists.

test_collect_dek_state_cached(mock_get_cache)[source]ΒΆ

Test collecting DEK state when DEK is cached.

test_collect_dek_state_no_dek()[source]ΒΆ

Test collecting DEK state when no DEK exists.

test_collect_dek_state_unwrap_success(mock_get_cache, mock_get_dek)[source]ΒΆ

Test collecting DEK state when DEK unwrap succeeds.

test_collect_dek_state_unwrap_failure(mock_get_cache, mock_get_dek)[source]ΒΆ

Test collecting DEK state when DEK unwrap fails.

test_collect_dek_state_no_kek(mock_get_cache)[source]ΒΆ

Test collecting DEK state when KEK is not available.

test_check_kek_exists_on_hsm_success()[source]ΒΆ

Test checking KEK exists on HSM when it does.

test_check_kek_exists_on_hsm_not_found()[source]ΒΆ

Test checking KEK exists on HSM when it doesn’t.

test_check_kek_exists_on_hsm_exception()[source]ΒΆ

Test checking KEK exists on HSM when exception occurs.

test_build()[source]ΒΆ

Test building StartupContext.

test_build_with_hsm()[source]ΒΆ

Test building StartupContext with HSM configuration.

test_build_for_db_init()[source]ΒΆ

Test building minimal StartupContext for database initialization.

test_method_chaining()[source]ΒΆ

Test method chaining works correctly.

test_collect_dek_state_with_backup_encrypted_dek(mock_get_cache)[source]ΒΆ

Test collecting DEK state when backup encrypted DEK exists.