Ticket #25772: 25772-test.diff

File 25772-test.diff, 659 bytes (added by Tim Graham, 8 years ago)
  • tests/postgres_tests/test_array.py

    diff --git a/tests/postgres_tests/test_array.py b/tests/postgres_tests/test_array.py
    index f504775..6bc2bb8 100644
    a b class TestQuerying(PostgreSQLTestCase):  
    231231            self.objs[0:3]
    232232        )
    233233
     234    def test_len(self):
     235        obj = NullableIntegerArrayModel.objects.create(field=[])
     236        self.assertSequenceEqual(
     237            NullableIntegerArrayModel.objects.filter(field__len=0),
     238            [obj]
     239        )
     240
    234241    def test_slice(self):
    235242        self.assertSequenceEqual(
    236243            NullableIntegerArrayModel.objects.filter(field__0_1=[2]),
Back to Top