mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Refs #31094 -- Added test for not using aliases in GROUP BY clauses.
This commit is contained in:
		
				
					committed by
					
						 Mariusz Felisiak
						Mariusz Felisiak
					
				
			
			
				
	
			
			
			
						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): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user