aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework
diff options
context:
space:
mode:
authorSerhiy Voyt2014-05-06 20:34:30 +0300
committerSerhiy Voyt2014-05-06 20:34:30 +0300
commit98cc8210990e3307a89d745acbbc2bcf6c665645 (patch)
treea9afc6548c5edea267fe0c6adba4e95ebdcd297e /rest_framework
parent4ce42fb72b707203c3883cea72ce0999794d2670 (diff)
downloaddjango-rest-framework-98cc8210990e3307a89d745acbbc2bcf6c665645.tar.bz2
Extended test with case of saveing model with blank not null field.
Diffstat (limited to 'rest_framework')
-rw-r--r--rest_framework/tests/test_serializer.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/rest_framework/tests/test_serializer.py b/rest_framework/tests/test_serializer.py
index e688c823..d770c637 100644
--- a/rest_framework/tests/test_serializer.py
+++ b/rest_framework/tests/test_serializer.py
@@ -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):
"""