  
  
  class CustomPageSizeKwargView(generics.ListAPIView):
      """
      View for testing custom page_size usage
      """
      model = BasicModel
      page_size_kwarg = 'ps'
  
  
 
</s> remove class CustomPageSizeKwargView(generics.ListAPIView):
 </s> add class PaginateByParamView(generics.ListAPIView): </s> remove     page_size_kwarg = 'ps'


class NonePageSizeKwargView(generics.ListAPIView):
    """
    View for testing None page_size usage
    """
    model = BasicModel
    page_size_kwarg = None
 </s> add     paginate_by_param = 'page_size' </s> remove     View for testing default page_size usage
 </s> add     View for testing default paginate_by_param usage </s> remove 

class TestNonePageSizeKwarg(TestCase):
    """
    Tests for list views with default page size kwarg
    """

    def setUp(self):
        """
        Create 13 BasicModel instances.
        """
        for i in range(13):
            BasicModel(text=i).save()
        self.objects = BasicModel.objects
        self.data = [
        {'id': obj.id, 'text': obj.text}
        for obj in self.objects.all()
        ]
        self.view = NonePageSizeKwargView.as_view()

    def test_default_page_size(self):
        """
        Tests the default page size for this view.
        no page size --> no limit --> no meta data
        """
        request = factory.get('/')
        response = self.view(request).render()
        self.assertEquals(response.data, self.data)

    def test_none_page_size_kwarg(self):
        """
        If page_size_kwarg is set to None, custom page_size per request should be disabled.
        """
        request = factory.get('/?page_size=5')
        response = self.view(request).render()
        self.assertEquals(response.data, self.data)
 </s> add 
    View for testing custom paginate_by_param usage
  
  
  class CustomPageSizeKwargView(generics.ListAPIView):
      """
    View for testing custom paginate_by_param usage
      """
      model = BasicModel
      page_size_kwarg = 'ps'
  
  
keep keep keep keep replace keep keep keep keep keep
 Polishing to page size query parameters & more docs 
rest_framework/tests/pagination.py