          """If validation fails due to no content, ensure the response contains a single non-field error"""
          content = {}
          try:
              validator.validate_request(content, None)
          except ErrorResponse, exc:
              self.assertEqual(exc.response.raw_content, {'field_errors': {'qwerty': ['This field is required.']}})
          else:
              self.fail('ResourceException was not raised')
  
      def validation_failed_due_to_field_error_returns_appropriate_message(self, validator):
          """If validation fails due to a field error, ensure the response contains a single field error"""
 
</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, {'errors': [MockForm.ERROR_TEXT]})
 </s> add         except ErrorResponse, response:
            self.assertEqual(response.raw_content, {'errors': [MockForm.ERROR_TEXT]}) </s> remove             raise ErrorResponse(status.HTTP_404_NOT_FOUND,
                                {'detail': 'That page contains no results'})
 </s> add             raise ErrorResponse(
                content={'detail': 'That page contains no results'},
                status=status.HTTP_404_NOT_FOUND)
        except ErrorResponse, response:
            self.assertEqual(response.raw_content, {'field_errors': {'qwerty': ['This field is required.']}})
          """If validation fails due to no content, ensure the response contains a single non-field error"""
          content = {}
          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.']}})
          else:
              self.fail('ResourceException was not raised')
  
      def validation_failed_due_to_field_error_returns_appropriate_message(self, validator):
          """If validation fails due to a field error, ensure the response contains a single field error"""
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