Skip to content

Commit fc08e01

Browse files
update tests to reflect that django now returns a callable for is_authenticated
1 parent 6f2c0db commit fc08e01

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_permissions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from django.db import models
1010
from django.test import TestCase
1111
from django.urls import ResolverMatch
12+
from django.utils.deprecation import CallableBool
1213

1314
from rest_framework import (
1415
HTTP_HEADER_ENCODING, authentication, generics, permissions, serializers,
@@ -544,7 +545,7 @@ def test_permission_denied_for_object_with_custom_detail(self):
544545

545546
class FakeUser:
546547
def __init__(self, auth=False):
547-
self.is_authenticated = auth
548+
self.is_authenticated = CallableBool(auth)
548549

549550

550551
class PermissionsCompositionTests(TestCase):

0 commit comments

Comments
 (0)