summaryrefslogtreecommitdiff
path: root/tests/auth_tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auth_tests')
-rw-r--r--tests/auth_tests/test_auth_backends.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/auth_tests/test_auth_backends.py b/tests/auth_tests/test_auth_backends.py
index 86d535703d..390d26ea9b 100644
--- a/tests/auth_tests/test_auth_backends.py
+++ b/tests/auth_tests/test_auth_backends.py
@@ -339,9 +339,7 @@ class SimpleRowlevelBackend:
return False
def has_module_perms(self, user, app_label):
- if not user.is_anonymous and not user.is_active:
- return False
- return app_label == "app1"
+ return (user.is_anonymous or user.is_active) and app_label == 'app1'
def get_all_permissions(self, user, obj=None):
if not obj: