          self.assertFalse(self.objects.filter(id=999).exists())
  
  
  class TestFKInstanceView(TestCase):
      def setUp(self):
          """
          Create 3 BasicModel instances.
          """
 
</s> remove             raise ValidationError(self._errors)
 </s> add             raise ValidationError(self.errors) </s> remove         return dict([
 </s> add         ret = dict([
    def test_put_error_instance_view(self):
        """
        Incorrect PUT requests in HTML should include a form error.
        """
        data = {'text': 'foobar' * 100}
        request = factory.put('/', data, HTTP_ACCEPT='text/html')
        response = self.view(request, pk=1).render()
        expected_error = '<span class="help-block">Ensure this field has no more than 100 characters.</span>'
        self.assertIn(expected_error, response.rendered_content)

          self.assertFalse(self.objects.filter(id=999).exists())
  
    def test_put_error_instance_view(self):
        """
        Incorrect PUT requests in HTML should include a form error.
        """
        data = {'text': 'foobar' * 100}
        request = factory.put('/', data, HTTP_ACCEPT='text/html')
        response = self.view(request, pk=1).render()
        expected_error = '<span class="help-block">Ensure this field has no more than 100 characters.</span>'
        self.assertIn(expected_error, response.rendered_content)

  
  class TestFKInstanceView(TestCase):
      def setUp(self):
          """
          Create 3 BasicModel instances.
          """
keep add keep keep keep keep keep keep
 Errors in browsable API on error. Closes #3024. 
tests/test_generics.py