summaryrefslogtreecommitdiff
path: root/tests/annotations
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2025-12-03 18:06:53 -0500
committerJacob Walls <jacobtylerwalls@gmail.com>2025-12-04 11:37:22 -0500
commit17d644c8e257c2ea5cc738fb7a9c47989e29bf09 (patch)
tree8cd96b4668e5334dc11a056b3c293e8e8579df45 /tests/annotations
parent26b0e2bb92caf2d16cabe455792350f20d6f42ca (diff)
Added DatabaseFeatures.prohibits_dollar_signs_in_column_aliases.
This is also applicable on CockroachDB.
Diffstat (limited to 'tests/annotations')
-rw-r--r--tests/annotations/tests.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/annotations/tests.py b/tests/annotations/tests.py
index 10cd05db63..6336cabafa 100644
--- a/tests/annotations/tests.py
+++ b/tests/annotations/tests.py
@@ -1545,8 +1545,11 @@ class AliasTests(TestCase):
qs = Book.objects.alias(
**{"crafted_alia$": FilteredRelation("authors")}
).values("name", "crafted_alia$")
- if connection.vendor == "postgresql":
- msg = "Dollar signs are not permitted in column aliases on PostgreSQL."
+ if connection.features.prohibits_dollar_signs_in_column_aliases:
+ msg = (
+ "Dollar signs are not permitted in column aliases on "
+ f"{connection.display_name}."
+ )
with self.assertRaisesMessage(ValueError, msg):
list(qs)
else: