Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
f9a0db3e
Commit
f9a0db3e
authored
Jan 31, 2017
by
José Padilla
Committed by
GitHub
Jan 31, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4867 from micgeronimo/pagination-tests
Add test for pagination when limit not set
parents
3001b56e
d610d150
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
tests/test_pagination.py
+7
-0
No files found.
tests/test_pagination.py
View file @
f9a0db3e
...
@@ -370,6 +370,13 @@ class TestLimitOffset:
...
@@ -370,6 +370,13 @@ class TestLimitOffset:
assert
self
.
pagination
.
display_page_controls
assert
self
.
pagination
.
display_page_controls
assert
isinstance
(
self
.
pagination
.
to_html
(),
type
(
''
))
assert
isinstance
(
self
.
pagination
.
to_html
(),
type
(
''
))
def
test_pagination_not_applied_if_limit_or_default_limit_not_set
(
self
):
class
MockPagination
(
pagination
.
LimitOffsetPagination
):
default_limit
=
None
request
=
Request
(
factory
.
get
(
'/'
))
queryset
=
MockPagination
()
.
paginate_queryset
(
self
.
queryset
,
request
)
assert
queryset
is
None
def
test_single_offset
(
self
):
def
test_single_offset
(
self
):
"""
"""
When the offset is not a multiple of the limit we get some edge cases:
When the offset is not a multiple of the limit we get some edge cases:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment