mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #31228 -- Reallowed aggregates to be used with multiple expressions and no DISTINCT on SQLite.
Regression in bc05547cd8.
Thanks Andy Terra for the report.
This commit is contained in:
@@ -63,6 +63,15 @@ class Tests(TestCase):
|
||||
with self.assertRaisesMessage(NotSupportedError, msg):
|
||||
connection.ops.check_expression_support(aggregate)
|
||||
|
||||
def test_distinct_aggregation_multiple_args_no_distinct(self):
|
||||
# Aggregate functions accept multiple arguments when DISTINCT isn't
|
||||
# used, e.g. GROUP_CONCAT().
|
||||
class DistinctAggregate(Aggregate):
|
||||
allow_distinct = True
|
||||
|
||||
aggregate = DistinctAggregate('first', 'second', distinct=False)
|
||||
connection.ops.check_expression_support(aggregate)
|
||||
|
||||
def test_memory_db_test_name(self):
|
||||
"""A named in-memory db should be allowed where supported."""
|
||||
from django.db.backends.sqlite3.base import DatabaseWrapper
|
||||
|
||||
Reference in New Issue
Block a user