From bc05547cd8c1dd511c6b6a6c873a1bc63417b111 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Wed, 9 Jan 2019 17:52:36 -0500 Subject: Fixed #28658 -- Added DISTINCT handling to the Aggregate class. --- tests/aggregation/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/aggregation') diff --git a/tests/aggregation/tests.py b/tests/aggregation/tests.py index a55ccfbfa2..75d2ecb1c5 100644 --- a/tests/aggregation/tests.py +++ b/tests/aggregation/tests.py @@ -1026,7 +1026,7 @@ class AggregateTestCase(TestCase): # test completely changing how the output is rendered def lower_case_function_override(self, compiler, connection): sql, params = compiler.compile(self.source_expressions[0]) - substitutions = {'function': self.function.lower(), 'expressions': sql} + substitutions = {'function': self.function.lower(), 'expressions': sql, 'distinct': ''} substitutions.update(self.extra) return self.template % substitutions, params setattr(MySum, 'as_' + connection.vendor, lower_case_function_override) @@ -1053,7 +1053,7 @@ class AggregateTestCase(TestCase): # test overriding all parts of the template def be_evil(self, compiler, connection): - substitutions = {'function': 'MAX', 'expressions': '2'} + substitutions = {'function': 'MAX', 'expressions': '2', 'distinct': ''} substitutions.update(self.extra) return self.template % substitutions, () setattr(MySum, 'as_' + connection.vendor, be_evil) -- cgit v1.3