summaryrefslogtreecommitdiff
path: root/tests/aggregation
diff options
context:
space:
mode:
authorSimon Charette <charettes@users.noreply.github.com>2019-01-09 17:52:36 -0500
committerTim Graham <timograham@gmail.com>2019-01-09 17:52:36 -0500
commitbc05547cd8c1dd511c6b6a6c873a1bc63417b111 (patch)
tree2ba1a136e77b21df2524d5558ea0a6f25d5ff03b /tests/aggregation
parent222caab68a2a7345043d0c50161203cb2cfe70eb (diff)
Fixed #28658 -- Added DISTINCT handling to the Aggregate class.
Diffstat (limited to 'tests/aggregation')
-rw-r--r--tests/aggregation/tests.py4
1 files changed, 2 insertions, 2 deletions
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)