diff options
Diffstat (limited to 'tests/postgres_tests/test_array.py')
| -rw-r--r-- | tests/postgres_tests/test_array.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/postgres_tests/test_array.py b/tests/postgres_tests/test_array.py index fc4687b68c..89603e24a0 100644 --- a/tests/postgres_tests/test_array.py +++ b/tests/postgres_tests/test_array.py @@ -253,6 +253,24 @@ class TestQuerying(PostgreSQLTestCase): [obj], ) + def test_exact_null_only_nested_array(self): + obj1 = NullableIntegerArrayModel.objects.create(field_nested=[[None, None]]) + obj2 = NullableIntegerArrayModel.objects.create( + field_nested=[[None, None], [None, None]], + ) + self.assertSequenceEqual( + NullableIntegerArrayModel.objects.filter( + field_nested__exact=[[None, None]], + ), + [obj1], + ) + self.assertSequenceEqual( + NullableIntegerArrayModel.objects.filter( + field_nested__exact=[[None, None], [None, None]], + ), + [obj2], + ) + def test_exact_with_expression(self): self.assertSequenceEqual( NullableIntegerArrayModel.objects.filter(field__exact=[Value(1)]), |
