

def test_custom_validation_method_is_executed(self):
    serializer = ShouldValidateModelSerializer(data={
        'renamed': 'fo',
    })
    self.assertFalse(serializer.is_valid())
    self.assertIn('renamed', serializer.errors)

dataset/ETHPy150Open tomchristie/django-rest-framework/tests/test_validation.py TestCustomValidationMethods.test_custom_validation_method_is_executed/original