Merge pull request #1309 from lukaszb/errors-for-renamed-fields

Should it be that way?
This commit is contained in:
Tom Christie 2013-12-21 13:58:49 -08:00
commit b7482629c3

View File

@ -67,6 +67,8 @@ class TestPreSaveValidationExclusionsSerializer(TestCase):
# does not have `blank=True`, so this serializer should not validate. # does not have `blank=True`, so this serializer should not validate.
serializer = ShouldValidateModelSerializer(data={'renamed': ''}) serializer = ShouldValidateModelSerializer(data={'renamed': ''})
self.assertEqual(serializer.is_valid(), False) self.assertEqual(serializer.is_valid(), False)
self.assertIn('renamed', serializer.errors)
self.assertNotIn('should_validate_field', serializer.errors)
class TestCustomValidationMethods(TestCase): class TestCustomValidationMethods(TestCase):