mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
Merge pull request #1309 from lukaszb/errors-for-renamed-fields
Should it be that way?
This commit is contained in:
commit
b7482629c3
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user