diff options
| author | Marc Tamlyn <marc.tamlyn@gmail.com> | 2014-11-15 15:37:03 +0000 |
|---|---|---|
| committer | Marc Tamlyn <marc.tamlyn@gmail.com> | 2014-11-15 15:37:03 +0000 |
| commit | 9a5a4361c577d14cad303019f14ebc6d1ec01674 (patch) | |
| tree | 00715a3161c6aaa0db384d8f9ce433837b911f19 /tests/postgres_tests/test_array.py | |
| parent | 9dde0a211e0be8829e03b3c0fb236c408f888d44 (diff) | |
| parent | a7c58eaca45ede76f94d2859877c7f42b28c48da (diff) | |
Merge pull request #3531 from ddaan/ticket_23834
fixed #23834 -- added test and fix to check for default null on ArrayField
Diffstat (limited to 'tests/postgres_tests/test_array.py')
| -rw-r--r-- | tests/postgres_tests/test_array.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/postgres_tests/test_array.py b/tests/postgres_tests/test_array.py index 33cf837dd4..68378483ec 100644 --- a/tests/postgres_tests/test_array.py +++ b/tests/postgres_tests/test_array.py @@ -48,6 +48,13 @@ class TestSaveLoad(TestCase): loaded = IntegerArrayModel.objects.get() self.assertEqual(loaded.field, [1]) + def test_default_null(self): + instance = NullableIntegerArrayModel() + instance.save() + loaded = NullableIntegerArrayModel.objects.get(pk=instance.pk) + self.assertEqual(loaded.field, None) + self.assertEqual(instance.field, loaded.field) + def test_null_handling(self): instance = NullableIntegerArrayModel(field=None) instance.save() |
