Refs #31094 -- Added test for not using aliases in GROUP BY clauses.
This commit is contained in:
parent
35d36d9462
commit
a0f34d8fef
|
@ -1138,6 +1138,8 @@ class AggregateTestCase(TestCase):
|
|||
with self.assertNumQueries(1) as ctx:
|
||||
list(publisher_qs)
|
||||
self.assertEqual(ctx[0]['sql'].count('SELECT'), 2)
|
||||
# The GROUP BY should not be by alias either.
|
||||
self.assertEqual(ctx[0]['sql'].lower().count('latest_book_pubdate'), 1)
|
||||
|
||||
@skipUnlessDBFeature('supports_subqueries_in_group_by')
|
||||
def test_group_by_subquery_annotation(self):
|
||||
|
|
Loading…
Reference in New Issue