update tests to reflect that django now returns a callable for is_authenticated

This commit is contained in:
Mark Davidoff 2018-10-29 08:26:20 -07:00 committed by GitHub
parent 6f2c0dbf4d
commit fc08e0189f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,7 @@ from django.contrib.auth.models import Group, Permission, User
from django.db import models from django.db import models
from django.test import TestCase from django.test import TestCase
from django.urls import ResolverMatch from django.urls import ResolverMatch
from django.utils.deprecation import CallableBool
from rest_framework import ( from rest_framework import (
HTTP_HEADER_ENCODING, authentication, generics, permissions, serializers, HTTP_HEADER_ENCODING, authentication, generics, permissions, serializers,
@ -544,7 +545,7 @@ class CustomPermissionsTests(TestCase):
class FakeUser: class FakeUser:
def __init__(self, auth=False): def __init__(self, auth=False):
self.is_authenticated = auth self.is_authenticated = CallableBool(auth)
class PermissionsCompositionTests(TestCase): class PermissionsCompositionTests(TestCase):