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:
parent
f05aab1a43
commit
0cf527f77c
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue