  
          # Force authenticating as `None` should also logout the user session.
          self.client.force_authenticate(None)
          response = self.client.get('/session-view/')
          self.assertEqual(response.data['active_session'], False)
  
      def test_csrf_exempt_by_default(self):
          """
          By default, the test client is CSRF exempt.
          """
 
</s> remove         self.assertEqual(response.data['active_session'], True)
 </s> add         assert response.data['active_session'] is True </s> remove         self.assertEqual(response.data['active_session'], False)
 </s> add         assert response.data['active_session'] is False </s> remove         self.assertEqual(response.status_code, 200)
 </s> add         assert response.status_code == 200 </s> remove         self.assertEqual(response.status_code, 200)
 </s> add         assert response.status_code == 200 </s> remove         self.assertIsNotNone(response.redirect_chain)
        self.assertEqual(response.status_code, 200)
 </s> add         assert response.redirect_chain is not None
        assert response.status_code == 200
        assert response.data['active_session'] is False
  
          # Force authenticating as `None` should also logout the user session.
          self.client.force_authenticate(None)
          response = self.client.get('/session-view/')
        assert response.data['active_session'] is False
  
      def test_csrf_exempt_by_default(self):
          """
          By default, the test client is CSRF exempt.
          """
keep keep keep keep replace keep keep keep keep keep
 converted testing test asserts to pytest (#4949)

* converted testing test asserts to pytest

* moved 3rd arg from test_empty_post_uses_default_boolean_value test assert 
tests/test_testing.py