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
d610d150
Commit
d610d150
authored
Jan 31, 2017
by
Artem Muterko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for pagination when limit not set
parent
3001b56e
Hide 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 @
d610d150
...
...
@@ -370,6 +370,13 @@ class TestLimitOffset:
assert
self
.
pagination
.
display_page_controls
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
):
"""
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