setup_wizard.tests.test_views.test_hsm_validation_extendedΒΆ

Comprehensive tests for HSM setup validation and helper methods.

ClassesΒΆ

TestHsmSetupMixinValidation

Test HSM setup validation methods.

TestSetupWizardRestoreOptionsView

Test restore options view.

Module ContentsΒΆ

class setup_wizard.tests.test_views.test_hsm_validation_extended.TestHsmSetupMixinValidation[source]ΒΆ

Test HSM setup validation methods.

setup_method()[source]ΒΆ

Set up test fixtures.

test_validate_hsm_inputs_invalid_module_path()[source]ΒΆ

Test validation with invalid module path.

test_validate_hsm_inputs_invalid_slot()[source]ΒΆ

Test validation with invalid slot.

test_validate_hsm_inputs_invalid_label()[source]ΒΆ

Test validation with invalid label.

test_validate_hsm_inputs_valid()[source]ΒΆ

Test validation with all valid inputs.

test_run_hsm_setup_script()[source]ΒΆ

Test running HSM setup script.

test_get_or_update_token_new(mock_get_or_create)[source]ΒΆ

Test getting or updating token (new token).

test_get_or_update_token_existing(mock_get_or_create)[source]ΒΆ

Test getting or updating token (existing token).

test_assign_token_to_crypto_storage_softhsm()[source]ΒΆ

Test assigning token to crypto storage for softhsm.

test_assign_token_to_crypto_storage_physical()[source]ΒΆ

Test assigning token to crypto storage for physical HSM.

test_generate_kek_and_dek()[source]ΒΆ

Test generating KEK and DEK.

test_add_success_message_created()[source]ΒΆ

Test adding success message for created token.

test_add_success_message_updated()[source]ΒΆ

Test adding success message for updated token.

test_raise_called_process_error_return_code_9()[source]ΒΆ

Test raising called process error with return code 9.

test_raise_called_process_error_return_code_10()[source]ΒΆ

Test raising called process error with return code 10.

test_handle_hsm_setup_exception_called_process_error()[source]ΒΆ

Test handling CalledProcessError.

test_handle_hsm_setup_exception_file_not_found()[source]ΒΆ

Test handling FileNotFoundError.

test_handle_hsm_setup_exception_generic()[source]ΒΆ

Test handling generic exception.

class setup_wizard.tests.test_views.test_hsm_validation_extended.TestSetupWizardRestoreOptionsView[source]ΒΆ

Test restore options view.

setup_method()[source]ΒΆ

Set up test fixtures.

test_dispatch_not_in_docker()[source]ΒΆ

Test dispatch when not in Docker.

test_dispatch_wrong_state(mock_redirect, mock_get_state)[source]ΒΆ

Test dispatch with wrong wizard state.