Commit 98cc8210 by Serhiy Voyt

Extended test with case of saveing model with blank not null field.

parent 4ce42fb7
......@@ -1236,6 +1236,8 @@ class BlankFieldTests(TestCase):
def test_create_model_null_field(self):
serializer = self.model_serializer_class(data={'title': None})
self.assertEqual(serializer.is_valid(), True)
serializer.save()
self.assertTrue(serializer.object.pk is not None)
def test_create_not_blank_field(self):
"""
......
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