summaryrefslogtreecommitdiff
path: root/tests/ordering/tests.py
diff options
context:
space:
mode:
authorruchit2801 <vithaniruchit@gmail.com>2019-05-17 13:00:57 +0530
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-05-18 19:29:00 +0200
commit04042b2b440f0bf50eb908d52cfe76af430e1738 (patch)
tree65dcb4110c7da75f8589b8c3f714a5e859335e6d /tests/ordering/tests.py
parente86cc14bd36734d81c4e490a2453778e33b95a45 (diff)
Fixed #30463 -- Fixed crash of deprecation message when Meta.ordering contains expressions.
Regression in 1b1f64ee5a78cc217fead52cbae23114502cf564.
Diffstat (limited to 'tests/ordering/tests.py')
-rw-r--r--tests/ordering/tests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/ordering/tests.py b/tests/ordering/tests.py
index 16e5cc9b2d..f0c4bba999 100644
--- a/tests/ordering/tests.py
+++ b/tests/ordering/tests.py
@@ -408,7 +408,9 @@ class OrderingTests(TestCase):
def test_deprecated_values_annotate(self):
msg = (
"Article QuerySet won't use Meta.ordering in Django 3.1. Add "
- ".order_by('-pub_date', 'headline') to retain the current query."
+ ".order_by('-pub_date', 'headline', OrderBy(F(author__name), "
+ "descending=False), OrderBy(F(second_author__name), "
+ "descending=False)) to retain the current query."
)
with self.assertRaisesMessage(RemovedInDjango31Warning, msg):
list(Article.objects.values('author').annotate(Count('headline')))