              form = MockForm
          
          content = {'field1': 'example1', 'field2': 'example2'}
          try:
              MockValidator().validate(content)
          except ResponseException, exc:           
              self.assertEqual(exc.response.raw_content, {'errors': [MockForm.ERROR_TEXT]})
          else:
              self.fail('ResourceException was not raised')  #pragma: no cover
  
 
</s> remove         class MockValidator(FormValidatorMixin):
 </s> add         class MockView(object): </s> remove             # If we still don't have a form instance then try to get an unbound form
            if not form_instance:
                try:
                    form_instance = resource.get_bound_form()
                except:
                    pass
 </s> add         # If we still don't have a form instance then try to get an unbound form
        if not form_instance:
            try:
                form_instance = resource.get_bound_form()
            except:
                pass </s> remove         
        self.MockFormValidator = MockFormValidator
        self.MockModelFormValidator = MockModelFormValidator       
 </s> add             validators = (ModelFormValidator,)
         
        self.MockFormView = MockFormView
        self.MockModelFormView = MockModelFormView        </s> remove             if not form_instance and resource.response.has_content_body:
 </s> add             if resource.response.has_content_body:
            FormValidator(view).validate(content)
              form = MockForm
          
          content = {'field1': 'example1', 'field2': 'example2'}
          try:
            FormValidator(view).validate(content)
          except ResponseException, exc:           
              self.assertEqual(exc.response.raw_content, {'errors': [MockForm.ERROR_TEXT]})
          else:
              self.fail('ResourceException was not raised')  #pragma: no cover
  
keep keep keep keep replace keep keep keep keep keep
 Lots of validator tests passing after refactor 
djangorestframework/tests/validators.py