          data = {'text': 'foobar' * 100}
          request = factory.post('/', data, HTTP_ACCEPT='text/html')
          response = self.view(request).render()
          expected_error = '<span class="help-block">Ensure this field has no more than 100 characters.</span>'
          self.assertIn(expected_error, response.rendered_content.decode('utf-8'))
  
  
  EXPECTED_QUERIES_FOR_PUT = 2
  
  
 
</s> remove         self.assertIn(expected_error, response.rendered_content.decode('utf-8'))
 </s> add         assert expected_error in response.rendered_content.decode('utf-8') </s> remove         self.assertEqual(created.content, 'foobar')
 </s> add         assert created.content == 'foobar' </s> remove         self.assertEqual(response.status_code, status.HTTP_201_CREATED)
 </s> add         assert response.status_code == status.HTTP_201_CREATED </s> remove         self.assertEqual(response.status_code, status.HTTP_201_CREATED)
        self.assertEqual(response.data, {'id': 4, 'text': 'foobar'})
 </s> add         assert response.status_code == status.HTTP_201_CREATED
        assert response.data == {'id': 4, 'text': 'foobar'} </s> remove         self.assertEqual(response.status_code, status.HTTP_405_METHOD_NOT_ALLOWED)
        self.assertEqual(response.data, {"detail": 'Method "POST" not allowed.'})
 </s> add         assert response.status_code == status.HTTP_405_METHOD_NOT_ALLOWED
        assert response.data == {"detail": 'Method "POST" not allowed.'}
        assert expected_error in response.rendered_content.decode('utf-8')
          data = {'text': 'foobar' * 100}
          request = factory.post('/', data, HTTP_ACCEPT='text/html')
          response = self.view(request).render()
          expected_error = '<span class="help-block">Ensure this field has no more than 100 characters.</span>'
        assert expected_error in response.rendered_content.decode('utf-8')
  
  
  EXPECTED_QUERIES_FOR_PUT = 2
  
  
keep keep keep keep replace keep keep keep keep keep
 converted test asserts of generics-test to pytest 
tests/test_generics.py