          """If validation for multiple reasons, ensure the response contains each error"""
          content = {'qwerty': '', 'extra': 'extra'}
          try:
              validator.validate_request(content, None)
          except ErrorResponse, exc:
              self.assertEqual(exc.response.raw_content, {'field_errors': {'qwerty': ['This field is required.'],
                                                                           'extra': ['This field does not exist.']}})
          else:
              self.fail('ResourceException was not raised')
  
      # Tests on FormResource
 
</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         except ErrorResponse, exc:
            self.assertEqual(exc.response.raw_content, {'errors': [MockForm.ERROR_TEXT]})
 </s> add         except ErrorResponse, response:
            self.assertEqual(response.raw_content, {'errors': [MockForm.ERROR_TEXT]}) </s> remove             response_obj = handler(request, *args, **kwargs)

            # Allow return value to be either HttpResponse, Response, or an object, or None
            if isinstance(response_obj, HttpResponse):
                return response_obj
            elif isinstance(response_obj, Response):
                response = response_obj
            elif response_obj is not None:
                response = Response(status.HTTP_200_OK, response_obj)
            else:
                response = Response(status.HTTP_204_NO_CONTENT)
 </s> add             # TODO: should we enforce HttpResponse, like Django does ?
            response = handler(request, *args, **kwargs)

            # Prepare response for the response cycle.
            self.prepare_response(response)
        except ErrorResponse, response:
            self.assertEqual(response.raw_content, {'field_errors': {'qwerty': ['This field is required.'],
          """If validation for multiple reasons, ensure the response contains each error"""
          content = {'qwerty': '', 'extra': 'extra'}
          try:
              validator.validate_request(content, None)
        except ErrorResponse, response:
            self.assertEqual(response.raw_content, {'field_errors': {'qwerty': ['This field is required.'],
        except ErrorResponse, response:
            self.assertEqual(response.raw_content, {'field_errors': {'qwerty': ['This field is required.'],
                                                                           'extra': ['This field does not exist.']}})
          else:
              self.fail('ResourceException was not raised')
  
      # Tests on FormResource
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