summaryrefslogtreecommitdiff
path: root/tests/annotations
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2022-11-05 12:49:33 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-11-07 12:21:29 +0100
commit5f09ab8c30050bbd076a9b27fb135d030c06ab75 (patch)
treee444003f8ad4fd5f992342ae2f5faa82ee98aea7 /tests/annotations
parent041551d716b69ee7c81199eee86a2d10a72e15ab (diff)
downloaddjango-5f09ab8c30050bbd076a9b27fb135d030c06ab75.tar.gz
Refs #17144 -- Removed support for grouping by primary key.
No core backend require the feature anymore as it was only added to support a MySQL'ism that has been deprecated since then.
Diffstat (limited to 'tests/annotations')
-rw-r--r--tests/annotations/tests.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/annotations/tests.py b/tests/annotations/tests.py
index 472669288c..52c15bba87 100644
--- a/tests/annotations/tests.py
+++ b/tests/annotations/tests.py
@@ -550,21 +550,6 @@ class NonAggregateAnnotationTestCase(TestCase):
for publisher in publishers.filter(pk=self.p1.pk):
self.assertEqual(publisher["book__rating"], publisher["total"])
- @skipUnlessDBFeature("allows_group_by_pk")
- def test_rawsql_group_by_collapse(self):
- raw = RawSQL("SELECT MIN(id) FROM annotations_book", [])
- qs = (
- Author.objects.values("id")
- .annotate(
- min_book_id=raw,
- count_friends=Count("friends"),
- )
- .order_by()
- )
- _, _, group_by = qs.query.get_compiler(using="default").pre_sql_setup()
- self.assertEqual(len(group_by), 1)
- self.assertNotEqual(raw, group_by[0])
-
def test_defer_annotation(self):
"""
Deferred attributes can be referenced by an annotation,