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

This commit is contained in:
Serhiy Voyt 2014-05-06 20:34:30 +03:00
parent 4ce42fb72b
commit 98cc821099

View File

@ -1236,6 +1236,8 @@ class BlankFieldTests(TestCase):
def test_create_model_null_field(self): def test_create_model_null_field(self):
serializer = self.model_serializer_class(data={'title': None}) serializer = self.model_serializer_class(data={'title': None})
self.assertEqual(serializer.is_valid(), True) self.assertEqual(serializer.is_valid(), True)
serializer.save()
self.assertTrue(serializer.object.pk is not None)
def test_create_not_blank_field(self): def test_create_not_blank_field(self):
""" """