mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #11557 -- Added support for a list of fields in Meta.get_latest_by and QuerySet.earliest()/latest().
This commit is contained in:
committed by
Tim Graham
parent
093fd479d6
commit
ad4a8acdb5
@@ -2365,7 +2365,7 @@ class WeirdQuerysetSlicingTests(TestCase):
|
||||
self.assertQuerysetEqual(Article.objects.all()[0:0], [])
|
||||
self.assertQuerysetEqual(Article.objects.all()[0:0][:10], [])
|
||||
self.assertEqual(Article.objects.all()[:0].count(), 0)
|
||||
with self.assertRaisesMessage(AssertionError, 'Cannot change a query once a slice has been taken.'):
|
||||
with self.assertRaisesMessage(TypeError, 'Cannot reverse a query once a slice has been taken.'):
|
||||
Article.objects.all()[:0].latest('created')
|
||||
|
||||
def test_empty_resultset_sql(self):
|
||||
|
||||
Reference in New Issue
Block a user