diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/modeltests/get_latest/tests.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/modeltests/get_latest/tests.py b/tests/modeltests/get_latest/tests.py index 3c3588bba0..97cd22bf91 100644 --- a/tests/modeltests/get_latest/tests.py +++ b/tests/modeltests/get_latest/tests.py @@ -43,6 +43,9 @@ class LatestTests(TestCase): a3, ) + # Ensure that latest() overrides any other ordering specified on the query. Refs #11283. + self.assertEqual(Article.objects.order_by('id').latest(), a4) + def test_latest_manual(self): # You can still use latest() with a model that doesn't have # "get_latest_by" set -- just pass in the field name manually. |
