aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_pagination.py
diff options
context:
space:
mode:
authorTom Christie2015-01-22 17:25:12 +0000
committerTom Christie2015-01-22 17:25:12 +0000
commit43d983fae82ab23ca94f52deb29e938eb2a40e88 (patch)
tree2466e74009d87b6698206b59f5b4681bcb6d66b0 /tests/test_pagination.py
parent0822c9e55820f8e4737329e38abc2e21718af9e5 (diff)
downloaddjango-rest-framework-43d983fae82ab23ca94f52deb29e938eb2a40e88.tar.bz2
Add paging controls
Diffstat (limited to 'tests/test_pagination.py')
-rw-r--r--tests/test_pagination.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_pagination.py b/tests/test_pagination.py
index 338be610..13bfb627 100644
--- a/tests/test_pagination.py
+++ b/tests/test_pagination.py
@@ -1,3 +1,4 @@
+# coding: utf-8
from __future__ import unicode_literals
from rest_framework import exceptions, generics, pagination, serializers, status, filters
from rest_framework.request import Request
@@ -471,7 +472,7 @@ class TestCursorPagination:
if item.created < int(created__lt)
])
- def order_by(self, ordering):
+ def order_by(self, *ordering):
if ordering[0].startswith('-'):
return MockQuerySet(list(reversed(self.items)))
return self
@@ -614,6 +615,8 @@ class TestCursorPagination:
assert current == [1, 1, 1, 1, 1]
assert next == [1, 2, 3, 4, 4]
+ assert isinstance(self.pagination.to_html(), type(''))
+
def test_get_displayed_page_numbers():
"""