Merge pull request #3946 from linovia/feature/remove_page_info_in_pagination_error_msg

Remove page information in pagination error messages
This commit is contained in:
José Padilla 2016-02-17 22:48:30 -04:00
commit c6dadc062d
2 changed files with 3 additions and 3 deletions

View File

@ -186,7 +186,7 @@ class PageNumberPagination(BasePagination):
template = 'rest_framework/pagination/numbers.html' template = 'rest_framework/pagination/numbers.html'
invalid_page_message = _('Invalid page "{page_number}": {message}.') invalid_page_message = _('Invalid page.')
def paginate_queryset(self, queryset, request, view=None): def paginate_queryset(self, queryset, request, view=None):
""" """

View File

@ -113,7 +113,7 @@ class TestPaginationIntegration:
response = self.view(request) response = self.view(request)
assert response.status_code == status.HTTP_404_NOT_FOUND assert response.status_code == status.HTTP_404_NOT_FOUND
assert response.data == { assert response.data == {
'detail': 'Invalid page "0": That page number is less than 1.' 'detail': 'Invalid page.'
} }
def test_404_not_found_for_invalid_page(self): def test_404_not_found_for_invalid_page(self):
@ -121,7 +121,7 @@ class TestPaginationIntegration:
response = self.view(request) response = self.view(request)
assert response.status_code == status.HTTP_404_NOT_FOUND assert response.status_code == status.HTTP_404_NOT_FOUND
assert response.data == { assert response.data == {
'detail': 'Invalid page "invalid": That page number is not an integer.' 'detail': 'Invalid page.'
} }