summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2024-04-11 18:07:08 -0400
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-04-12 10:23:04 +0200
commit73b62a21265c4a417004d64d13a896469e2558f3 (patch)
treebbbf2edb9bbcf7554d361c6c4805947acc014911
parentc223d14025dd9ef0d354332c537ed8622a1ec29c (diff)
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.
-rw-r--r--tests/schema/tests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/schema/tests.py b/tests/schema/tests.py
index 86ac7382cc..ff126d446a 100644
--- a/tests/schema/tests.py
+++ b/tests/schema/tests.py
@@ -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(),
)