Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing a testcase

  • Loading branch information...
commit 35e354784c3fc3aadf526ca2c0a73fbbec4ec54b 1 parent 53473ba
@coleifer authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  tests.py
View
2  tests.py
@@ -2497,7 +2497,7 @@ def test_annotate_custom_aggregate(self):
def test_annotate_multiple(self):
annotated = Blog.select().annotate(Entry).annotate(Entry, Max('pub_date', 'max_pub'))
self.assertSQLEqual(annotated.sql(), (
- 'SELECT t1."id", t1."title", COUNT(t2.`pk`) AS count, MAX(t2."pub_date") AS max_pub FROM "blog" AS t1 INNER JOIN "entry" AS t2 ON t1."id" = t2."blog_id" GROUP BY t1."id", t1."title"', []
+ 'SELECT t1.`id`, t1.`title`, COUNT(t2.`pk`) AS count, MAX(t2.`pub_date`) AS max_pub FROM `blog` AS t1 INNER JOIN `entry` AS t2 ON t1.`id` = t2.`blog_id` GROUP BY t1.`id`, t1.`title`', []
))
# No leftover asterisks
self.assertEqual(annotated.sql()[0].count('*'), 0)
Please sign in to comment.
Something went wrong with that request. Please try again.