mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-07 13:54:47 +03:00
Merge 0b57efe014
into 1d26b398ad
This commit is contained in:
commit
24e61969fd
|
@ -108,6 +108,17 @@ class TestPaginationIntegration:
|
||||||
'count': 50
|
'count': 50
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def test_additional_blank_query_params_are_preserved(self):
|
||||||
|
request = factory.get('/?foobar&page=2')
|
||||||
|
response = self.view(request)
|
||||||
|
assert response.status_code == status.HTTP_200_OK
|
||||||
|
assert response.data == {
|
||||||
|
'results': [12, 14, 16, 18, 20],
|
||||||
|
'previous': 'http://testserver/?foobar',
|
||||||
|
'next': 'http://testserver/?foobar&page=3',
|
||||||
|
'count': 50
|
||||||
|
}
|
||||||
|
|
||||||
def test_404_not_found_for_zero_page(self):
|
def test_404_not_found_for_zero_page(self):
|
||||||
request = factory.get('/', {'page': '0'})
|
request = factory.get('/', {'page': '0'})
|
||||||
response = self.view(request)
|
response = self.view(request)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user