management.tests.test_views.test_settingsΒΆ
Test suite for settings views.
ClassesΒΆ
Test suite for SettingsView. |
|
Test suite for ChangeLogLevelView. |
|
Test suite for LOG_LEVELS constant. |
Module ContentsΒΆ
- class management.tests.test_views.test_settings.SettingsViewTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for SettingsView.
- test_get_form_kwargs_with_existing_config()[source]ΒΆ
Test get_form_kwargs returns existing SecurityConfig.
- test_get_form_kwargs_creates_config_if_missing()[source]ΒΆ
Test get_form_kwargs creates SecurityConfig if it doesnβt exist.
- test_get_context_data_includes_page_info()[source]ΒΆ
Test get_context_data includes page category and name.
- test_get_context_data_includes_current_log_level()[source]ΒΆ
Test get_context_data includes current log level.
- test_get_context_data_includes_notification_configs()[source]ΒΆ
Test get_context_data includes notification configurations JSON.
- test_form_valid_saves_and_applies_settings(mock_apply)[source]ΒΆ
Test form_valid saves form and applies security settings.
- test_form_valid_resets_settings_on_security_mode_increase(mock_apply)[source]ΒΆ
Test form_valid resets settings when security mode is increased.
- test_form_valid_enables_auto_gen_pki(mock_apply, mock_enable)[source]ΒΆ
Test form_valid enables AutoGenPkiFeature when auto_gen_pki is enabled.
- test_form_valid_disables_auto_gen_pki(mock_apply, mock_disable)[source]ΒΆ
Test form_valid disables AutoGenPkiFeature when auto_gen_pki is disabled.
- test_form_valid_handles_missing_security_mode()[source]ΒΆ
Test form_valid handles missing security_mode value.
- class management.tests.test_views.test_settings.ChangeLogLevelViewTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for ChangeLogLevelView.
- test_post_with_valid_log_level()[source]ΒΆ
Test POST with valid log level updates logger and database.
- test_post_with_lowercase_log_level()[source]ΒΆ
Test POST with lowercase log level (gets converted to uppercase).