  from djangorestframework.views import BaseView
  from djangorestframework.resources import Resource
  
  
  class TestValidatorMixinInterfaces(TestCase):
      """Basic tests to ensure that the ValidatorMixin classes expose the expected interfaces"""
  
      def test_validator_mixin_interface(self):
          """Ensure the ValidatorMixin base class interface is as expected."""
          self.assertRaises(NotImplementedError, BaseValidator(None).validate, None)
  
  
  class TestDisabledValidations(TestCase):
      """Tests on FormValidator with validation disabled by setting form to None"""
  
      def test_disabled_form_validator_returns_content_unchanged(self):
 
</s> remove from djangorestframework.validators import BaseValidator, FormValidator, ModelFormValidator
 </s> add from djangorestframework.resources import Resource, FormResource, ModelResource </s> remove         """If the view's form attribute is None then FormValidator(view).validate(content)
 </s> add         """If the view's form attribute is None then FormValidator(view).validate_request(content, None) </s> remove         class DisabledFormView(BaseView):
 </s> add         class DisabledFormResource(FormResource): </s> remove         validator = ModelFormValidator(self.MockModelFormView())
 </s> add         validator = self.MockModelResource(self.MockModelFormView())
  from djangorestframework.views import BaseView
  from djangorestframework.resources import Resource
  
  







  
  class TestDisabledValidations(TestCase):
      """Tests on FormValidator with validation disabled by setting form to None"""
  
      def test_disabled_form_validator_returns_content_unchanged(self):
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
 validators tests -> resources tests 
djangorestframework/tests/validators.py