management.tests.test_security_decoratorsΒΆ
Test suite for security decorators.
ClassesΒΆ
Mock security feature for testing. |
|
Test suite for the security_level decorator. |
Module ContentsΒΆ
- class management.tests.test_security_decorators.MockSecurityFeature[source]ΒΆ
Bases:
management.security.features.SecurityFeatureMock security feature for testing.
- class management.tests.test_security_decorators.SecurityLevelDecoratorTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for the security_level decorator.
- test_decorator_allows_access_when_feature_allowed()[source]ΒΆ
Test decorator allows function execution when feature is allowed.
- test_decorator_denies_access_when_feature_not_allowed()[source]ΒΆ
Test decorator raises PermissionDenied when feature is not allowed.
- test_decorator_with_feature_class()[source]ΒΆ
Test decorator works with feature class instead of instance.
- test_decorator_preserves_function_metadata()[source]ΒΆ
Test decorator preserves original functionβs metadata using functools.wraps.
- test_decorator_passes_args_and_kwargs()[source]ΒΆ
Test decorator correctly passes arguments and keyword arguments to decorated function.
- test_decorator_with_autogenpki_feature()[source]ΒΆ
Test decorator works with real AutoGenPkiFeature.
- test_decorator_raises_permission_denied_with_correct_message()[source]ΒΆ
Test decorator raises PermissionDenied with informative message.
- test_decorator_creates_new_security_manager_per_call()[source]ΒΆ
Test decorator creates a new SecurityManager instance for each call.
- test_decorator_with_exception_in_decorated_function()[source]ΒΆ
Test decorator allows exceptions from decorated function to propagate.
- test_decorator_with_return_value()[source]ΒΆ
Test decorator correctly returns value from decorated function.
- test_decorator_with_none_return()[source]ΒΆ
Test decorator works when decorated function returns None.