          self.client.force_authenticate(user=user, token=token)
          response = self.client.get('/view/')
  
          assert response.data['user'] == 'example'
  
      def test_force_authenticate_with_sessions(self):
          """
          Setting `.force_authenticate()` forcibly authenticates each request.
 
</s> remove         self.client.force_authenticate(user)
 </s> add         self.client.force_authenticate(user=user)
        response = self.client.get('/view/')

        assert response.data['user'] == 'example'
        assert 'token' not in response.data

    def test_force_authenticate_with_token(self):
        """
        Setting `.force_authenticate()` with a token forcibly authenticates each
        request with that token.
        """
        user = User.objects.create_user('example', 'example@example.com')
        token = Token.objects.create(key='xyz', user=user)

        self.client.force_authenticate(token=token) </s> remove         Setting `.force_authenticate()` forcibly authenticates each request.
 </s> add         Setting `.force_authenticate()` with a user forcibly authenticates each
        request with that user. </s> remove     def test_force_authenticate(self):
 </s> add     def test_force_authenticate_with_user(self): </s> remove         # Force authenticating as `None` should also logout the user session.
        self.client.force_authenticate(None)
 </s> add         # Force authenticating with `None` user and token should also logout
        # the user session.
        self.client.force_authenticate(user=None, token=None)
        assert response.data['token'] == 'xyz'
          self.client.force_authenticate(user=user, token=token)
          response = self.client.get('/view/')
  
          assert response.data['user'] == 'example'
        assert response.data['token'] == 'xyz'
  
      def test_force_authenticate_with_sessions(self):
          """
          Setting `.force_authenticate()` forcibly authenticates each request.
keep keep keep add keep keep keep keep
 Make `APIClient.force_authenticate()` work with `user=None` (#8212)

* Fix testing with token

* Add unit test

* Split unit test into 3

* Fix linting error 
tests/test_testing.py