                  if 'field1' in self.cleaned_data and 'field2' in self.cleaned_data:
                      raise forms.ValidationError(self.ERROR_TEXT)
                  return self.cleaned_data  #pragma: no cover
          
          class MockValidator(FormValidatorMixin):
              form = MockForm
          
          content = {'field1': 'example1', 'field2': 'example2'}
          try:
              MockValidator().validate(content)
 
</s> remove             MockValidator().validate(content)
 </s> add             FormValidator(view).validate(content) </s> remove         property_fields = set(attr for attr in dir(self.model) if
                              isinstance(getattr(self.model, attr, None), property)
 </s> add         model = getattr(self.view, 'model', None)
        fields = getattr(self.view, 'fields', self.fields)
        exclude_fields = getattr(self.view, 'exclude_fields', self.exclude_fields)

        property_fields = set(attr for attr in dir(model) if
                              isinstance(getattr(model, attr, None), property) </s> remove             field_errors = dict((key, map(unicode, val)) for (key, val) in bound_form.errors.iteritems() if not key.startswith('__'))
 </s> add             field_errors = dict((key, map(unicode, val))
                for (key, val)
                in bound_form.errors.iteritems()
                if not key.startswith('__')) </s> remove         if self.fields:
            return property_fields & set(as_tuple(self.fields))
 </s> add         if fields:
            return property_fields & set(as_tuple(fields))
        class MockView(object):
                  if 'field1' in self.cleaned_data and 'field2' in self.cleaned_data:
                      raise forms.ValidationError(self.ERROR_TEXT)
                  return self.cleaned_data  #pragma: no cover
          
        class MockView(object):
              form = MockForm
          
          content = {'field1': 'example1', 'field2': 'example2'}
          try:
              MockValidator().validate(content)
keep keep keep keep replace keep keep keep keep keep
 Lots of validator tests passing after refactor 
djangorestframework/tests/validators.py