Fixed a test that was failing in Oracle due to default ordering assumptions.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15783 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ian Kelly 2011-03-09 19:20:35 +00:00
parent f05aab1a43
commit 0cf527f77c
1 changed files with 14 additions and 14 deletions

View File

@ -568,12 +568,12 @@ class AggregationTests(TestCase):
) )
publishers = Publisher.objects.filter(id__in=[1, 2]) publishers = Publisher.objects.filter(id__in=[1, 2])
self.assertQuerysetEqual( self.assertEqual(
publishers, [ sorted(p.name for p in publishers),
[
"Apress", "Apress",
"Sams" "Sams"
], ]
lambda p: p.name
) )
publishers = publishers.annotate(n_books=Count("book")) publishers = publishers.annotate(n_books=Count("book"))
@ -582,12 +582,12 @@ class AggregationTests(TestCase):
2 2
) )
self.assertQuerysetEqual( self.assertEqual(
publishers, [ sorted(p.name for p in publishers),
[
"Apress", "Apress",
"Sams", "Sams"
], ]
lambda p: p.name
) )
books = Book.objects.filter(publisher__in=publishers) books = Book.objects.filter(publisher__in=publishers)
@ -599,12 +599,12 @@ class AggregationTests(TestCase):
], ],
lambda b: b.name lambda b: b.name
) )
self.assertQuerysetEqual( self.assertEqual(
publishers, [ sorted(p.name for p in publishers),
[
"Apress", "Apress",
"Sams", "Sams"
], ]
lambda p: p.name
) )
# Regression for 10666 - inherited fields work with annotations and # Regression for 10666 - inherited fields work with annotations and