setup_wizard.tests.test_forms.test_backuppasswordformΒΆ

Tests for the BackupPasswordForm.

ClassesΒΆ

BackupPasswordFormTestCase

Test cases for BackupPasswordForm.

Module ContentsΒΆ

class setup_wizard.tests.test_forms.test_backuppasswordform.BackupPasswordFormTestCase(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for BackupPasswordForm.

test_form_field_configuration()[source]ΒΆ

Test that form fields are configured correctly.

test_form_valid_data()[source]ΒΆ

Test form validation with valid matching passwords.

test_form_empty_data()[source]ΒΆ

Test form validation with empty data.

test_form_missing_password()[source]ΒΆ

Test form validation with missing password.

test_form_missing_confirm_password()[source]ΒΆ

Test form validation with missing confirm password.

test_clean_password_empty_value()[source]ΒΆ

Test clean_password method with empty value.

test_clean_password_none_value()[source]ΒΆ

Test clean_password method with None value.

test_clean_password_with_validation_success(mock_validate)[source]ΒΆ

Test clean_password method with successful Django validation.

test_clean_password_with_validation_failure(mock_validate)[source]ΒΆ

Test clean_password method with Django validation failure.

test_clean_passwords_match()[source]ΒΆ

Test form validation when passwords match.

test_clean_passwords_do_not_match()[source]ΒΆ

Test form validation when passwords do not match.

test_clean_method_with_super_clean_returning_none()[source]ΒΆ

Test clean method behavior when super().clean() returns None.

test_clean_with_partial_data()[source]ΒΆ

Test clean method with partial password data.

test_password_widget_security_attributes()[source]ΒΆ

Test that password widgets have appropriate security attributes.

test_form_field_help_text_translations()[source]ΒΆ

Test that help text and labels use translation strings.

test_form_integration_with_real_validation()[source]ΒΆ

Test form with real Django password validation (no mocking).

test_form_rendering_attributes()[source]ΒΆ

Test that form fields render with correct HTML attributes.

test_form_csrf_protection_compatibility()[source]ΒΆ

Test that form works correctly with CSRF protection.

test_password_mismatch_error_behavior()[source]ΒΆ

Test the password mismatch error behavior in detail.

test_clean_method_error_handling()[source]ΒΆ

Test that clean method properly handles various error conditions.

test_django_password_validation_integration()[source]ΒΆ

Test integration with Django’s password validation system.

test_bootstrap_form_control_classes()[source]ΒΆ

Test that form uses Bootstrap form-control classes following Trustpoint patterns.

test_form_help_text_for_user_guidance()[source]ΒΆ

Test that form provides helpful guidance to users.

test_form_accessibility_attributes()[source]ΒΆ

Test that form has appropriate accessibility attributes.