From 2cc90728defa891332fe3894b6a8fd7c56bcd7c3 Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Wed, 15 Oct 2025 22:18:33 -0400 Subject: [PATCH] [6.0.x] Refs #36648 -- Removed hardcoded pk in CompositePKAggregateTests. Backport of bee64561a6e8cd22995c2b1254bab66dae892a6d from main. --- tests/composite_pk/test_aggregate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/composite_pk/test_aggregate.py b/tests/composite_pk/test_aggregate.py index 8a2067cb90..43f9e7a7cd 100644 --- a/tests/composite_pk/test_aggregate.py +++ b/tests/composite_pk/test_aggregate.py @@ -145,13 +145,13 @@ class CompositePKAggregateTests(TestCase): def test_first_from_unordered_queryset_aggregation_pk_selected(self): self.assertEqual( Comment.objects.values("pk").annotate(max=Max("id")).first(), - {"pk": (1, 1), "max": 1}, + {"pk": (self.comment_1.tenant_id, 1), "max": 1}, ) def test_first_from_unordered_queryset_aggregation_pk_selected_separately(self): self.assertEqual( Comment.objects.values("tenant", "id").annotate(max=Max("id")).first(), - {"tenant": 1, "id": 1, "max": 1}, + {"tenant": self.comment_1.tenant_id, "id": 1, "max": 1}, ) def test_first_from_unordered_queryset_aggregation_pk_incomplete(self):