      def test_modelform_validation_failed_due_to_invalid_field_returns_appropriate_message(self):
          self.validation_failed_due_to_invalid_field_returns_appropriate_message(self.MockModelFormValidator())
  
      def test_modelform_validation_failed_due_to_multiple_errors_returns_appropriate_message(self):
          self.validation_failed_due_to_multiple_errors_returns_appropriate_message(self.MockModelFormValidator())
  
  
  class TestModelFormValidator(TestCase):
      """Tests specific to ModelFormValidatorMixin"""
      
      def setUp(self):
          """Create a validator for a model with two fields and a property."""    
          class MockModel(models.Model):
              qwerty = models.CharField(max_length=256)
              uiop = models.CharField(max_length=256, blank=True)
              
              @property
              def readonly(self):
                  return 'read only'
              
          class MockValidator(ModelFormValidatorMixin):
              model = MockModel
         
          self.MockValidator = MockValidator
  
  
      def test_property_fields_are_allowed_on_model_forms(self):
          """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
          content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
          self.assertEqual(self.MockValidator().validate(content), content)
  
      def test_property_fields_are_not_required_on_model_forms(self):
          """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
          content = {'qwerty':'example', 'uiop': 'example'}
          self.assertEqual(self.MockValidator().validate(content), content)
  
      def test_extra_fields_not_allowed_on_model_forms(self):
          """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
          It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
          broken clients more easily (eg submitting content with a misnamed field)"""
          content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
          self.assertRaises(ResponseException, self.MockValidator().validate, content)
      
      def test_validate_requires_fields_on_model_forms(self):
          """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
          It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
          broken clients more easily (eg submitting content with a misnamed field)"""
          content = {'readonly': 'read only'} 
          self.assertRaises(ResponseException, self.MockValidator().validate, content)
      
      def test_validate_does_not_require_blankable_fields_on_model_forms(self):
          """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
          content = {'qwerty':'example', 'readonly': 'read only'}
          self.MockValidator().validate(content)
      
      def test_model_form_validator_uses_model_forms(self):
          self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
  
  
 
</s> remove 
        content = {'qwerty':'uiop'}     
        self.assertEqual(DisabledModelFormValidator().get_bound_form(content), None)

 </s> add             model = None
 
        view = DisabledModelFormView()
        content = {'qwerty':'uiop'}       
        self.assertEqual(ModelFormValidator(view).get_bound_form(content), None)#  </s> remove         model_fields = set(field.name for field in self.model._meta.fields)
 </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)

        model_fields = set(field.name for field in model._meta.fields) </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         """If the form attribute is None on FormValidatorMixin then validate(content) should just return the content unmodified."""
        class DisabledModelFormValidator(ModelFormValidatorMixin):
 </s> add         """If the view's form and model attributes are None then
        ModelFormValidator(view).validate(content) should just return the content unmodified."""
        class DisabledModelFormView(object): </s> remove         """If the form attribute is None on FormValidatorMixin then validate(content) should just return the content unmodified."""
        class DisabledFormValidator(FormValidatorMixin):
 </s> add         """If the view's form attribute is None then FormValidator(view).validate(content)
        should just return the content unmodified."""
        class DisabledFormView(object):
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
      def test_modelform_validation_failed_due_to_invalid_field_returns_appropriate_message(self):
          self.validation_failed_due_to_invalid_field_returns_appropriate_message(self.MockModelFormValidator())
  
      def test_modelform_validation_failed_due_to_multiple_errors_returns_appropriate_message(self):
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
        validator = ModelFormValidator(self.MockModelFormView())
        self.validation_failed_due_to_multiple_errors_returns_appropriate_message(validator)


# class TestModelFormValidator(TestCase):
#     """Tests specific to ModelFormValidatorMixin"""
#     
#     def setUp(self):
#         """Create a validator for a model with two fields and a property."""    
#         class MockModel(models.Model):
#             qwerty = models.CharField(max_length=256)
#             uiop = models.CharField(max_length=256, blank=True)
#             
#             @property
#             def readonly(self):
#                 return 'read only'
#             
#         class MockValidator(ModelFormValidatorMixin):
#             model = MockModel
#        
#         self.MockValidator = MockValidator
# 
# 
#     def test_property_fields_are_allowed_on_model_forms(self):
#         """Validation on ModelForms may include property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example', 'readonly': 'read only'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_property_fields_are_not_required_on_model_forms(self):
#         """Validation on ModelForms does not require property fields that exist on the Model to be included in the input."""
#         content = {'qwerty':'example', 'uiop': 'example'}
#         self.assertEqual(self.MockValidator().validate(content), content)
# 
#     def test_extra_fields_not_allowed_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'qwerty': 'example', 'uiop':'example', 'readonly': 'read only', 'extra': 'extra'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_requires_fields_on_model_forms(self):
#         """If some (otherwise valid) content includes fields that are not in the form then validation should fail.
#         It might be okay on normal form submission, but for Web APIs we oughta get strict, as it'll help show up
#         broken clients more easily (eg submitting content with a misnamed field)"""
#         content = {'readonly': 'read only'} 
#         self.assertRaises(ResponseException, self.MockValidator().validate, content)
#     
#     def test_validate_does_not_require_blankable_fields_on_model_forms(self):
#         """Test standard ModelForm validation behaviour - fields with blank=True are not required."""
#         content = {'qwerty':'example', 'readonly': 'read only'}
#         self.MockValidator().validate(content)
#     
#     def test_model_form_validator_uses_model_forms(self):
#         self.assertTrue(isinstance(self.MockValidator().get_bound_form(), forms.ModelForm))
  
  
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep
 Lots of validator tests passing after refactor 
djangorestframework/tests/validators.py