mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Refs #35194 -- Adjusted a generated field test to work on Postgres 15.6+.
Postgres >= 12.18, 13.14, 14.11, 15.6, 16.2 changed the way the immutability of generated and default expressions is detected in postgres/postgres@743ddaf. The adjusted test semantic is presereved by switching from __icontains to __contains as both make use of a `%` literal which requires proper escaping. Refs #35336. Thanks bcail for the report.
This commit is contained in:
parent
c223d14025
commit
73b62a2126
@ -913,7 +913,7 @@ class SchemaTests(TransactionTestCase):
|
||||
editor.create_model(GeneratedFieldContainsModel)
|
||||
|
||||
field = GeneratedField(
|
||||
expression=Q(text__icontains="FOO"),
|
||||
expression=Q(text__contains="foo"),
|
||||
db_persist=True,
|
||||
output_field=BooleanField(),
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user