1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

[2.0.x] Fixed #28702 -- Made query lookups for CIText fields use citext.

Backport of f0a68c2511 from master
This commit is contained in:
Mads Jensen
2017-11-14 22:51:51 +01:00
committed by Tim Graham
parent ae4132a940
commit 4d3b8e199e
6 changed files with 36 additions and 3 deletions

View File

@@ -138,6 +138,10 @@ class Tests(TestCase):
for lookup in lookups:
with self.subTest(lookup=lookup):
self.assertIn('::text', do.lookup_cast(lookup))
for lookup in lookups:
for field_type in ('CICharField', 'CIEmailField', 'CITextField'):
with self.subTest(lookup=lookup, field_type=field_type):
self.assertIn('::citext', do.lookup_cast(lookup, internal_type=field_type))
def test_correct_extraction_psycopg2_version(self):
from django.db.backends.postgresql.base import psycopg2_version