summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2025-10-15 22:18:33 -0400
committerJacob Walls <jacobtylerwalls@gmail.com>2025-10-15 23:45:45 -0400
commitdc61f205781733f41dd3630f5ca48bccda6c0cbc (patch)
treed20d2c2f9b5e354534061dd3b8cd8119f3f76d14 /tests
parent8baee531d40cd6ee8b342dbcf2c7924d20694969 (diff)
[5.2.x] Refs #36648 -- Removed hardcoded pk in CompositePKAggregateTests.
Backport of bee64561a6e8cd22995c2b1254bab66dae892a6d from main.
Diffstat (limited to 'tests')
-rw-r--r--tests/composite_pk/test_aggregate.py4
1 files 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):