              self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
              self.assertEqual(detail, self.custom_message)
  
  
  class FakeUser:
      def __init__(self, auth=False):
          self.is_authenticated = CallableBool(auth)
  
  
  class PermissionsCompositionTests(TestCase):
      def test_and_false(self):
          request = factory.get('/1', format='json')
 
</s> remove class PermissionsCompositionTests(TestCase):
 </s> add  </s> remove         request.user = FakeUser(auth=False)
 </s> add         request.user = AnonymousUser() </s> remove         request.user = FakeUser(auth=True)
 </s> add         request.user = self.user </s> remove         request.user = FakeUser(auth=False)
 </s> add         request.user = AnonymousUser()
class PermissionsCompositionTests(TestCase):
              self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
              self.assertEqual(detail, self.custom_message)
  
  
class PermissionsCompositionTests(TestCase):
class PermissionsCompositionTests(TestCase):
class PermissionsCompositionTests(TestCase):
  
  
  class PermissionsCompositionTests(TestCase):
      def test_and_false(self):
          request = factory.get('/1', format='json')
keep keep keep keep replace replace replace keep keep keep keep keep
 use actual user instead of fake user in permission composition test 
tests/test_permissions.py