management.tests.test_security_managerΒΆ
Test suite for security manager.
ClassesΒΆ
Mock security feature for testing. |
|
Mock security feature for testing. |
|
Test suite for SecurityManager. |
Module ContentsΒΆ
- class management.tests.test_security_manager.MockSecurityFeature1[source]ΒΆ
Bases:
management.security.features.SecurityFeatureMock security feature for testing.
- class management.tests.test_security_manager.MockSecurityFeature2[source]ΒΆ
Bases:
management.security.features.SecurityFeatureMock security feature for testing.
- class management.tests.test_security_manager.SecurityManagerTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for SecurityManager.
- test_get_security_level_returns_current_level()[source]ΒΆ
Test get_security_level returns the current security mode.
- test_get_security_level_with_different_modes()[source]ΒΆ
Test get_security_level with different security modes.
- test_get_security_config_model_returns_config()[source]ΒΆ
Test get_security_config_model returns SecurityConfig instance.
- test_is_feature_allowed_returns_true_for_dev_mode()[source]ΒΆ
Test is_feature_allowed always returns True in DEV mode.
- test_is_feature_allowed_with_feature_class()[source]ΒΆ
Test is_feature_allowed works with feature class.
- test_is_feature_allowed_with_feature_instance()[source]ΒΆ
Test is_feature_allowed works with feature instance.
- test_is_feature_allowed_returns_false_when_not_allowed()[source]ΒΆ
Test is_feature_allowed returns False when feature not in allowed set.
- test_is_feature_allowed_with_target_level_parameter()[source]ΒΆ
Test is_feature_allowed with explicit target_level parameter.
- test_is_feature_allowed_with_target_level_dev()[source]ΒΆ
Test is_feature_allowed with target_level=DEV returns True.
- test_get_features_to_disable_returns_correct_features()[source]ΒΆ
Test get_features_to_disable returns features not allowed at given level.
- test_get_features_to_disable_returns_empty_for_dev()[source]ΒΆ
Test get_features_to_disable returns empty list for DEV mode.
- test_get_features_to_disable_with_different_levels()[source]ΒΆ
Test get_features_to_disable with different security levels.
- test_reset_settings_disables_features(mock_disable)[source]ΒΆ
Test reset_settings calls disable on features that are not allowed.
- test_reset_settings_does_not_disable_allowed_features(mock_disable)[source]ΒΆ
Test reset_settings does not disable features that remain allowed.
- test_enable_feature_calls_enable_when_allowed(mock_enable)[source]ΒΆ
Test enable_feature calls enable method when feature is allowed.
- test_enable_feature_does_not_call_enable_when_not_allowed(mock_enable)[source]ΒΆ
Test enable_feature does not call enable when feature is not allowed.
- test_enable_feature_with_kwargs(mock_enable)[source]ΒΆ
Test enable_feature passes kwargs to enable method.
- test_enable_feature_with_none_kwargs(mock_enable)[source]ΒΆ
Test enable_feature calls enable without kwargs when kwargs is None.
- test_enable_feature_with_feature_instance(mock_enable)[source]ΒΆ
Test enable_feature works with feature instance.
- test_is_feature_allowed_handles_string_security_level()[source]ΒΆ
Test is_feature_allowed correctly handles string security level values.