Commit 973f898a by Lukasz Balcerzak

Should it be that way?

parent 0e3822d6
......@@ -61,6 +61,8 @@ class TestPreSaveValidationExclusionsSerializer(TestCase):
# does not have `blank=True`, so this serializer should not validate.
serializer = ShouldValidateModelSerializer(data={'renamed': ''})
self.assertEqual(serializer.is_valid(), False)
self.assertIn('renamed', serializer.errors)
self.assertNotIn('should_validate_field', serializer.errors)
class ValidationSerializer(serializers.Serializer):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment