#35368: Postgres schema test failure locally
-------------------------------------+-------------------------------------
Reporter: bcail | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: dev
(models, ORM) | Resolution:
Severity: Normal | worksforme
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):
* stage: Unreviewed => Accepted
Comment:
I'm able to reproduce against the Postgres 16.2 Docker image
[https://code.djangoproject.com/ticket/35194#comment:3 just like Mariuzs
did a few weeks ago].
Not sure what the proper solution is though the failure modes seems a bit
arbitrary
1. `UPPER("test"::text) = UPPER('yes')` 💥
2. `UPPER("test") = ('YES')` ✅
3. `UPPER("test") = UPPER('yes')` 💥
I guess we could adapt the test to avoid using `UPPER` to address this
immediate issue as it's not relevant to the test (it was interested in
covering `%` usage)
{{{#!diff
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 Meta:
editor.create_model(GeneratedFieldContainsModel)
field = GeneratedField(
- expression=Q(text__icontains="FOO"),
+ expression=Q(text__contains="foo"),
db_persist=True,
output_field=BooleanField(),
)
}}}
And then re-open #35194 for further investigation?
--
Ticket URL: <https://code.djangoproject.com/ticket/35368#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018eceda72de-86831ecd-3470-4deb-9bcc-d37743b76ab3-000000%40eu-central-1.amazonses.com.