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:45:20 -0400 |
| commit | 2cc90728defa891332fe3894b6a8fd7c56bcd7c3 (patch) | |
| tree | a2382348510267be1164448cbc54a71499d6738f /tests/composite_pk | |
| parent | 5c114ce2d8479549ee9dd486bc28df5b2e3d54ad (diff) | |
[6.0.x] Refs #36648 -- Removed hardcoded pk in CompositePKAggregateTests.
Backport of bee64561a6e8cd22995c2b1254bab66dae892a6d from main.
Diffstat (limited to 'tests/composite_pk')
| -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): |
