diff options
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 fb7eb16da2..b514a4329e 100644 --- a/tests/postgres_tests/test_array.py +++ b/tests/postgres_tests/test_array.py @@ -218,6 +218,13 @@ class TestQuerying(TestCase): self.objs[0:3] ) + def test_len_empty_array(self): + obj = NullableIntegerArrayModel.objects.create(field=[]) + self.assertSequenceEqual( + NullableIntegerArrayModel.objects.filter(field__len=0), + [obj] + ) + def test_slice(self): self.assertSequenceEqual( NullableIntegerArrayModel.objects.filter(field__0_1=[2]), |
