mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 03:23:59 +03:00
update tests to reflect that django now returns a callable for is_authenticated
This commit is contained in:
parent
6f2c0dbf4d
commit
fc08e0189f
|
@ -9,6 +9,7 @@ from django.contrib.auth.models import Group, Permission, User
|
|||
from django.db import models
|
||||
from django.test import TestCase
|
||||
from django.urls import ResolverMatch
|
||||
from django.utils.deprecation import CallableBool
|
||||
|
||||
from rest_framework import (
|
||||
HTTP_HEADER_ENCODING, authentication, generics, permissions, serializers,
|
||||
|
@ -544,7 +545,7 @@ class CustomPermissionsTests(TestCase):
|
|||
|
||||
class FakeUser:
|
||||
def __init__(self, auth=False):
|
||||
self.is_authenticated = auth
|
||||
self.is_authenticated = CallableBool(auth)
|
||||
|
||||
|
||||
class PermissionsCompositionTests(TestCase):
|
||||
|
|
Loading…
Reference in New Issue
Block a user