Skip to content

Commit bee6456

Browse files
Refs #36648 -- Removed hardcoded pk in CompositePKAggregateTests.
1 parent 37df013 commit bee6456

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/composite_pk/test_aggregate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ def test_max_pk(self):
145145
def test_first_from_unordered_queryset_aggregation_pk_selected(self):
146146
self.assertEqual(
147147
Comment.objects.values("pk").annotate(max=Max("id")).first(),
148-
{"pk": (1, 1), "max": 1},
148+
{"pk": (self.comment_1.tenant_id, 1), "max": 1},
149149
)
150150

151151
def test_first_from_unordered_queryset_aggregation_pk_selected_separately(self):
152152
self.assertEqual(
153153
Comment.objects.values("tenant", "id").annotate(max=Max("id")).first(),
154-
{"tenant": 1, "id": 1, "max": 1},
154+
{"tenant": self.comment_1.tenant_id, "id": 1, "max": 1},
155155
)
156156

157157
def test_first_from_unordered_queryset_aggregation_pk_incomplete(self):

0 commit comments

Comments
 (0)