          ]
          self.view = FilterFieldsRootView.as_view()
  
      @unittest.skipUnless(django_filters, 'django-filters not installed')
      def test_get_paginated_filtered_root_view(self):
          """
          GET requests to paginated filtered ListCreateAPIView should return
          paginated results. The next and previous links should preserve the
          filtered parameters.
          """
 
</s> remove         self.view = FilterFieldsRootView.as_view()
 </s> add  </s> remove         response = self.view(request).render()
 </s> add         with self.assertNumQueries(EXPECTED_NUM_QUERIES):
            response = view(request).render() </s> remove         response = self.view(request).render()
 </s> add         with self.assertNumQueries(EXPECTED_NUM_QUERIES):
            response = view(request).render()
        self.assertEqual(response.status_code, status.HTTP_200_OK)
        self.assertEqual(response.data['count'], 15)
        self.assertEqual(response.data['results'], self.data[:10])
        self.assertNotEqual(response.data['next'], None)
        self.assertEqual(response.data['previous'], None)

    def test_get_basic_paginated_filtered_root_view(self):
        """
        Same as `test_get_django_filter_paginated_filtered_root_view`,
        except using a custom filter backend instead of the django-filter
        backend,
        """

        class DecimalFilterBackend(filters.BaseFilterBackend):
            def filter_queryset(self, request, queryset, view):
                return queryset.filter(decimal__lt=Decimal(request.GET['decimal']))

        class BasicFilterFieldsRootView(generics.ListCreateAPIView):
            model = FilterableItem
            paginate_by = 10
            filter_backend = DecimalFilterBackend

        view = BasicFilterFieldsRootView.as_view()

        request = factory.get('/?decimal=15.20')
        with self.assertNumQueries(2):
            response = view(request).render()
        self.assertEqual(response.status_code, status.HTTP_200_OK)
        self.assertEqual(response.data['count'], 15)
        self.assertEqual(response.data['results'], self.data[:10])
        self.assertNotEqual(response.data['next'], None)
        self.assertEqual(response.data['previous'], None)

        request = factory.get(response.data['next'])
        with self.assertNumQueries(2):
            response = view(request).render()
        self.assertEqual(response.status_code, status.HTTP_200_OK)
        self.assertEqual(response.data['count'], 15)
        self.assertEqual(response.data['results'], self.data[10:15])
        self.assertEqual(response.data['next'], None)
        self.assertNotEqual(response.data['previous'], None)

        request = factory.get(response.data['previous'])
        with self.assertNumQueries(2):
            response = view(request).render() </s> remove if django_filters:
    class DecimalFilter(django_filters.FilterSet):
        decimal = django_filters.NumberFilter(lookup_type='lt')

        class Meta:
            model = FilterableItem
            fields = ['text', 'decimal', 'date']

    class FilterFieldsRootView(generics.ListCreateAPIView):
        model = FilterableItem
        paginate_by = 10
        filter_class = DecimalFilter
        filter_backend = filters.DjangoFilterBackend


 </s> add  </s> remove        -egit+git://github.com/alex/django-filter.git#egg=django_filter
 </s> add        django-filter==0.6a1
    def test_get_django_filter_paginated_filtered_root_view(self):
          ]
          self.view = FilterFieldsRootView.as_view()
  
      @unittest.skipUnless(django_filters, 'django-filters not installed')
    def test_get_django_filter_paginated_filtered_root_view(self):
          """
          GET requests to paginated filtered ListCreateAPIView should return
          paginated results. The next and previous links should preserve the
          filtered parameters.
          """
keep keep keep keep replace keep keep keep keep keep
 Use django-filter 0.6a1 and add database query count tests for paginated, filtered lists. 
rest_framework/tests/pagination.py