From eea4f92f9aa57d1b25f1c28d11c3b5a6a5841e82 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Sat, 16 Dec 2023 14:05:36 -0500 Subject: [PATCH] Refs #34013 -- Registered instance lookups as documented in tests. --- tests/aggregation/tests.py | 2 +- tests/queries/test_qs_combinators.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/aggregation/tests.py b/tests/aggregation/tests.py index bedc2730a2..62e9c6a27a 100644 --- a/tests/aggregation/tests.py +++ b/tests/aggregation/tests.py @@ -1734,7 +1734,7 @@ class AggregateTestCase(TestCase): super().__init__(expr, 100) sum_field = IntegerField() - sum_field.register_instance_lookup(Mod100, "mod100") + sum_field.register_lookup(Mod100, "mod100") publisher_pages = ( Book.objects.values("publisher") .annotate(sum_pages=Sum("pages", output_field=sum_field)) diff --git a/tests/queries/test_qs_combinators.py b/tests/queries/test_qs_combinators.py index cb5ba1a269..4c2dbc5b17 100644 --- a/tests/queries/test_qs_combinators.py +++ b/tests/queries/test_qs_combinators.py @@ -337,7 +337,7 @@ class QuerySetSetOperationTests(TestCase): super().__init__(expr, 2) output_field = IntegerField() - output_field.register_instance_lookup(Mod2, "mod2") + output_field.register_lookup(Mod2, "mod2") qs1 = Number.objects.annotate( annotation=Value(1, output_field=output_field), )