diff options
| author | Serhiy Voyt | 2014-05-06 20:34:30 +0300 | 
|---|---|---|
| committer | Serhiy Voyt | 2014-05-06 20:34:30 +0300 | 
| commit | 98cc8210990e3307a89d745acbbc2bcf6c665645 (patch) | |
| tree | a9afc6548c5edea267fe0c6adba4e95ebdcd297e /rest_framework | |
| parent | 4ce42fb72b707203c3883cea72ce0999794d2670 (diff) | |
| download | django-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.py | 2 | 
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):          """  | 
