diff options
| author | Simon Charette <charette.s@gmail.com> | 2019-12-19 09:10:02 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-12-19 09:12:29 +0100 |
| commit | a0f34d8fef2942e17c40e7009b355b661d30e138 (patch) | |
| tree | e5c40d3e8a7aa4eff9800680e6d4c85c8a0b5003 /tests/aggregation | |
| parent | 35d36d946272bed06a3d7c7cd4e5b71b613e7a4f (diff) | |
Refs #31094 -- Added test for not using aliases in GROUP BY clauses.
Diffstat (limited to 'tests/aggregation')
| -rw-r--r-- | tests/aggregation/tests.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/aggregation/tests.py b/tests/aggregation/tests.py index a93c39e3d5..322db8ea1a 100644 --- a/tests/aggregation/tests.py +++ b/tests/aggregation/tests.py @@ -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): |
