diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-09-07 19:28:19 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-09-10 12:01:00 +0200 |
| commit | 0ddb4ebf7bfcc4730c80a772dd146a49ef6895f6 (patch) | |
| tree | c6a203b757d104c08c4a9786ac1521b87c26fe0a /tests/ordering | |
| parent | d17be88afd5f5e1059491e10408ba239e2e99fe2 (diff) | |
Refs #14357 -- Made Meta.ordering not affect GROUP BY queries.
Per deprecation timeline.
Diffstat (limited to 'tests/ordering')
| -rw-r--r-- | tests/ordering/tests.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/tests/ordering/tests.py b/tests/ordering/tests.py index 5ee3c60324..a9cc729c45 100644 --- a/tests/ordering/tests.py +++ b/tests/ordering/tests.py @@ -3,11 +3,10 @@ from operator import attrgetter from django.core.exceptions import FieldError from django.db.models import ( - CharField, Count, DateTimeField, F, Max, OuterRef, Subquery, Value, + CharField, DateTimeField, F, Max, OuterRef, Subquery, Value, ) from django.db.models.functions import Upper from django.test import TestCase -from django.utils.deprecation import RemovedInDjango31Warning from .models import Article, Author, ChildArticle, OrderedByFArticle, Reference @@ -481,13 +480,3 @@ class OrderingTests(TestCase): ca4 = ChildArticle.objects.create(headline='h1', pub_date=datetime(2005, 7, 28)) articles = ChildArticle.objects.order_by('article_ptr') self.assertSequenceEqual(articles, [ca4, ca2, ca1, ca3]) - - def test_deprecated_values_annotate(self): - msg = ( - "Article QuerySet won't use Meta.ordering in Django 3.1. Add " - ".order_by('-pub_date', F(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'))) |
