Refs #29703 -- Removed QuerySetPaginator alias per deprecation timeline.

This commit is contained in:
Mariusz Felisiak 2019-09-06 08:07:20 +02:00
parent cb2be9d5d5
commit 81993b47ea
3 changed files with 3 additions and 19 deletions

View file

@ -2,11 +2,10 @@ import warnings
from datetime import datetime
from django.core.paginator import (
EmptyPage, InvalidPage, PageNotAnInteger, Paginator, QuerySetPaginator,
EmptyPage, InvalidPage, PageNotAnInteger, Paginator,
UnorderedObjectListWarning,
)
from django.test import SimpleTestCase, TestCase
from django.utils.deprecation import RemovedInDjango31Warning
from .custom import ValidAdjacentNumsPaginator
from .models import Article
@ -298,12 +297,6 @@ class PaginationTests(SimpleTestCase):
with self.assertRaises(EmptyPage):
paginator.get_page(1)
def test_querysetpaginator_deprecation(self):
msg = 'The QuerySetPaginator alias of Paginator is deprecated.'
with self.assertWarnsMessage(RemovedInDjango31Warning, msg) as cm:
QuerySetPaginator([], 1)
self.assertEqual(cm.filename, __file__)
class ModelPaginationTests(TestCase):
"""