          view = MockView()
          content = {'field1': 'example1', 'field2': 'example2'}
          try:
              MockResource(view).validate_request(content, None)
          except ErrorResponse, exc:
              self.assertEqual(exc.response.raw_content, {'errors': [MockForm.ERROR_TEXT]})
          else:
              self.fail('ErrorResponse was not raised')
  
  
  class TestFormValidation(TestCase):
 
</s> remove         except ErrorResponse, exc:
            self.assertEqual(exc.response.raw_content, {'field_errors': {'qwerty': ['This field is required.'],
 </s> add         except ErrorResponse, response:
            self.assertEqual(response.raw_content, {'field_errors': {'qwerty': ['This field is required.'], </s> remove         except ErrorResponse, exc:
            self.assertEqual(exc.response.raw_content, {'field_errors': {'extra': ['This field does not exist.']}})
 </s> add         except ErrorResponse, response:
            self.assertEqual(response.raw_content, {'field_errors': {'extra': ['This field does not exist.']}}) </s> remove         except ErrorResponse, exc:
            self.assertEqual(exc.response.raw_content, {'field_errors': {'qwerty': ['This field is required.']}})
 </s> add         except ErrorResponse, response:
            self.assertEqual(response.raw_content, {'field_errors': {'qwerty': ['This field is required.']}}) </s> remove         except ErrorResponse, exc:
            self.assertEqual(exc.response.raw_content, {'field_errors': {'qwerty': ['This field is required.']}})
 </s> add         except ErrorResponse, response:
            self.assertEqual(response.raw_content, {'field_errors': {'qwerty': ['This field is required.']}}) </s> remove                 raise ErrorResponse(status.HTTP_400_BAD_REQUEST,
                                    {'detail': 'YAML parse error - %s' % unicode(exc)})
 </s> add                 raise ErrorResponse(
                    content={'detail': 'YAML parse error - %s' % unicode(exc)},
                    status=status.HTTP_400_BAD_REQUEST)
        except ErrorResponse, response:
            self.assertEqual(response.raw_content, {'errors': [MockForm.ERROR_TEXT]})
          view = MockView()
          content = {'field1': 'example1', 'field2': 'example2'}
          try:
              MockResource(view).validate_request(content, None)
        except ErrorResponse, response:
            self.assertEqual(response.raw_content, {'errors': [MockForm.ERROR_TEXT]})
        except ErrorResponse, response:
            self.assertEqual(response.raw_content, {'errors': [MockForm.ERROR_TEXT]})
          else:
              self.fail('ErrorResponse was not raised')
  
  
  class TestFormValidation(TestCase):
keep keep keep keep replace replace keep keep keep keep keep
 Response as a subclass of HttpResponse - first draft, not quite there yet. 
djangorestframework/tests/validators.py