

def test_renamed_fields_are_model_validated(self):
    "\n        Ensure fields with 'source' applied do get still get model validation.\n        "
    serializer = ShouldValidateModelSerializer(data={
        'renamed': '',
    })
    self.assertEqual(serializer.is_valid(), False)
    self.assertIn('renamed', serializer.errors)
    self.assertNotIn('should_validate_field', serializer.errors)

dataset/ETHPy150Open tomchristie/django-rest-framework/tests/test_validation.py TestPreSaveValidationExclusionsSerializer.test_renamed_fields_are_model_validated/original