          factory = APIRequestFactory()
          request = factory.post('/view/')
          request.user = user
          response = view(request)
          self.assertEqual(response.status_code, 200)
  
      def test_explicitly_enforce_csrf_checks(self):
          """
          The test client can enforce CSRF checks.
          """
 
</s> remove         self.assertEqual(response.status_code, 200)
 </s> add         assert response.status_code == 200 </s> remove         self.assertEqual(response.status_code, 403)
        self.assertEqual(response.data, expected)
 </s> add         assert response.status_code == 403
        assert response.data == expected </s> remove         self.assertEqual(dict(request.GET), {'demo': ['test']})
 </s> add         assert dict(request.GET) == {'demo': ['test']} </s> remove         self.assertEqual(response.data['user'], 'example')
 </s> add         assert response.data['user'] == 'example' </s> remove         self.assertEqual(response.data['active_session'], False)
 </s> add         assert response.data['active_session'] is False
        assert response.status_code == 200
          factory = APIRequestFactory()
          request = factory.post('/view/')
          request.user = user
          response = view(request)
        assert response.status_code == 200
  
      def test_explicitly_enforce_csrf_checks(self):
          """
          The test client can enforce CSRF checks.
          """
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