From 0ae94d0d3127adabcb0afaf32fd5dbe47d74cd57 Mon Sep 17 00:00:00 2001 From: Marc Tamlyn Date: Tue, 20 Jan 2015 09:52:23 +0000 Subject: Fixes #24169 -- More arrayfield specific lookups. varchar()[] cannot compare itself to text[] Thanks to joelburton for the patch. --- tests/postgres_tests/test_array.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/postgres_tests/test_array.py') diff --git a/tests/postgres_tests/test_array.py b/tests/postgres_tests/test_array.py index 5c300f7ea3..020b31658f 100644 --- a/tests/postgres_tests/test_array.py +++ b/tests/postgres_tests/test_array.py @@ -156,6 +156,18 @@ class TestQuerying(TestCase): [] ) + def test_contained_by_charfield(self): + self.assertSequenceEqual( + CharArrayModel.objects.filter(field__contained_by=['text']), + [] + ) + + def test_overlap_charfield(self): + self.assertSequenceEqual( + CharArrayModel.objects.filter(field__overlap=['text']), + [] + ) + def test_index(self): self.assertSequenceEqual( NullableIntegerArrayModel.objects.filter(field__0=2), -- cgit v1.3