management.tests.test_security_mixinsΒΆ
Test suite for security mixins.
ClassesΒΆ
Mock security feature for testing. |
|
Test suite for SecurityLevelMixin. |
|
Test suite for SecurityLevelMixinRedirect. |
Module ContentsΒΆ
- class management.tests.test_security_mixins.MockSecurityFeature[source]ΒΆ
Bases:
management.security.features.SecurityFeatureMock security feature for testing.
- class management.tests.test_security_mixins.SecurityLevelMixinTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for SecurityLevelMixin.
- test_init_without_security_feature()[source]ΒΆ
Test __init__ works without security_feature parameter.
- test_get_security_level_returns_current_level()[source]ΒΆ
Test get_security_level returns the current security mode.
- class management.tests.test_security_mixins.SecurityLevelMixinRedirectTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for SecurityLevelMixinRedirect.
- test_init_with_redirect_url()[source]ΒΆ
Test __init__ accepts disabled_by_security_level_url parameter.
- test_init_without_redirect_url()[source]ΒΆ
Test __init__ works without disabled_by_security_level_url parameter.
- test_dispatch_allows_access_when_feature_allowed()[source]ΒΆ
Test dispatch allows access when feature is allowed.
- test_dispatch_redirects_when_feature_not_allowed()[source]ΒΆ
Test dispatch redirects when feature is not allowed.
- test_dispatch_adds_error_message_on_redirect()[source]ΒΆ
Test dispatch adds error message when redirecting due to security level.
- test_dispatch_calls_parent_dispatch_when_allowed()[source]ΒΆ
Test dispatch calls parent dispatch method when feature is allowed.
- test_inherits_from_security_level_mixin()[source]ΒΆ
Test SecurityLevelMixinRedirect inherits from SecurityLevelMixin.