mirror of
https://github.com/django/django.git
synced 2025-08-30 15:27:40 +00:00
Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.
This commit is contained in:
parent
edee5a8de6
commit
2c69824e5a
63 changed files with 145 additions and 150 deletions
|
@ -1114,7 +1114,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 = dict(function=self.function.lower(), expressions=sql)
|
||||
substitutions = {'function': self.function.lower(), 'expressions': sql}
|
||||
substitutions.update(self.extra)
|
||||
return self.template % substitutions, params
|
||||
setattr(MySum, 'as_' + connection.vendor, lower_case_function_override)
|
||||
|
@ -1141,7 +1141,7 @@ class AggregateTestCase(TestCase):
|
|||
|
||||
# test overriding all parts of the template
|
||||
def be_evil(self, compiler, connection):
|
||||
substitutions = dict(function='MAX', expressions='2')
|
||||
substitutions = {'function': 'MAX', 'expressions': '2'}
|
||||
substitutions.update(self.extra)
|
||||
return self.template % substitutions, ()
|
||||
setattr(MySum, 'as_' + connection.vendor, be_evil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue