  
  class TestFormValidation(TestCase):
      """Tests which check basic form validation.
      Also includes the same set of tests with a ModelFormValidator for which the form has been explicitly set.
      (ModelFormValidatorMixin should behave as FormValidatorMixin if form is set rather than relying on the default ModelForm)"""
      def setUp(self):       
          class MockForm(forms.Form):
              qwerty = forms.CharField(required=True)
  
          class MockFormValidator(FormValidatorMixin):
 
</s> remove         class MockFormValidator(FormValidatorMixin):
 </s> add         class MockFormView(object): </s> remove         if self.form:
 </s> add         form_cls = getattr(self.view, 'form', None)
        model_cls = getattr(self.view, 'model', None)

        if form_cls: </s> remove     """The form class that should be used for validation, or None to turn off form validation."""
    form = None
    bound_form_instance = None
 </s> add     The view class should provide `.form` attribute which specifies the form classmethod
    to be used for validation.
    
    On calling validate() this validator may set a `.bound_form_instance` attribute on the
    view, which may be used by some renderers."""
 </s> remove class ModelFormValidatorMixin(FormValidatorMixin):
    """Validator Mixin that uses forms for validation and falls back to a model form if no form is set.
    Extends the ValidatorMixin interface to also provide a get_bound_form() method.
    (Which may be used by some emitters.)"""
 </s> add class ModelFormValidator(FormValidator):
    """Validator class that uses forms for validation and otherwise falls back to a model form if no form is set.
    Also provides a get_bound_form() method which may be used by some renderers."""
    (ModelFormValidator should behave as FormValidator if a form is set rather than relying on the default ModelForm)"""
  
  class TestFormValidation(TestCase):
      """Tests which check basic form validation.
      Also includes the same set of tests with a ModelFormValidator for which the form has been explicitly set.
    (ModelFormValidator should behave as FormValidator if a form is set rather than relying on the default ModelForm)"""
      def setUp(self):       
          class MockForm(forms.Form):
              qwerty = forms.CharField(required=True)
  
          class MockFormValidator(FormValidatorMixin):
keep keep keep keep replace keep keep keep keep keep
 Lots of validator tests passing after refactor 
djangorestframework/tests/validators.py