summaryrefslogtreecommitdiff
path: root/tests/pagination
diff options
context:
space:
mode:
authorNick Pope <nick.pope@flightdataservices.com>2018-08-22 19:40:14 +0100
committerTim Graham <timograham@gmail.com>2018-08-27 16:23:43 -0400
commited4bfacb3c942d0d32795e1a733b1b9367afd2e9 (patch)
tree9a75d8337cc33a2e2bb4b6b325e8287d77ecbd82 /tests/pagination
parent44f98f78804627839d5f0a8b3a32bfbb4546ff52 (diff)
downloaddjango-ed4bfacb3c942d0d32795e1a733b1b9367afd2e9.tar.gz
Fixed #29703 -- Deprecated QuerySetPaginator alias.
Unused since 4406d283e13819b04556df21044089b7d119edb0.
Diffstat (limited to 'tests/pagination')
-rw-r--r--tests/pagination/tests.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/pagination/tests.py b/tests/pagination/tests.py
index 8ab04940ab..20e74981cd 100644
--- a/tests/pagination/tests.py
+++ b/tests/pagination/tests.py
@@ -2,10 +2,11 @@ import warnings
from datetime import datetime
from django.core.paginator import (
- EmptyPage, InvalidPage, PageNotAnInteger, Paginator,
+ EmptyPage, InvalidPage, PageNotAnInteger, Paginator, QuerySetPaginator,
UnorderedObjectListWarning,
)
from django.test import SimpleTestCase, TestCase
+from django.utils.deprecation import RemovedInDjango31Warning
from .custom import ValidAdjacentNumsPaginator
from .models import Article
@@ -297,6 +298,12 @@ 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):
"""