      def test_paginate_by_param(self):
          """
          If paginate_by_param is set, the new kwarg should limit per view requests.
          """
          request = factory.get('/?page_size=5')
          response = self.view(request).render()
          self.assertEqual(response.data['count'], 13)
          self.assertEqual(response.data['results'], self.data[:5])
  
  
 
</s> remove         request = factory.get('/?page_size=10')
 </s> add         request = factory.get('/', data={'page_size': 10}) </s> remove         request = factory.get('/?integer=%s' % search_integer)
 </s> add         request = factory.get('/', {'integer': '%s' % search_integer}) </s> remove         request = factory.get(response.data['next'])
 </s> add         request = factory.get(*split_arguments_from_url(response.data['next'])) </s> remove         request = factory.get(response.data['next'])
 </s> add         request = factory.get(*split_arguments_from_url(response.data['next']))
        request = factory.get('/', {'page_size': 5})
      def test_paginate_by_param(self):
          """
          If paginate_by_param is set, the new kwarg should limit per view requests.
          """
        request = factory.get('/', {'page_size': 5})
          response = self.view(request).render()
          self.assertEqual(response.data['count'], 13)
          self.assertEqual(response.data['results'], self.data[:5])
  
  
keep keep keep keep replace keep keep keep keep keep
 Refactoring due to the previous commit. 
rest_framework/tests/test_pagination.py