diff options
| author | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-10-15 22:18:33 -0400 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-10-15 23:44:14 -0400 |
| commit | bee64561a6e8cd22995c2b1254bab66dae892a6d (patch) | |
| tree | a17fa720c0d15c6ed98e1b6d73702fe8b206b6aa | |
| parent | 37df013195c4ddc8aa7c4334126419a358149d3c (diff) | |
Refs #36648 -- Removed hardcoded pk in CompositePKAggregateTests.
| -rw-r--r-- | tests/composite_pk/test_aggregate.py | 4 |
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): |
