          expected_data = [f for f in self.data if f['decimal'] == search_decimal]
          self.assertEqual(response.data, expected_data)
  
      @unittest.skipUnless(django_filters, 'django-filters not installed')
      def test_get_filtered_class_root_view(self):
          """
          GET requests to filtered ListCreateAPIView that have a filter_class set
          should return filtered results.
          """
 
</s> remove     def get_filter_class(self, view):
 </s> add     def get_filter_class(self, view, queryset=None): </s> remove             assert model_cls is not None, 'Cannot use DjangoFilterBackend ' \
                'on a view which does not have a .model or .queryset attribute.'

 </s> add  </s> remove         model_cls = getattr(view, 'model', None)
        queryset = getattr(view, 'queryset', None)
        if model_cls is None and queryset is not None:
            model_cls = queryset.model
 </s> add  </s> remove                     model = model_cls
 </s> add                     model = queryset.model </s> remove         filter_class = self.get_filter_class(view)
 </s> add         filter_class = self.get_filter_class(view, queryset)
    @unittest.skipUnless(django_filters, 'django-filters not installed')
    def test_filter_with_get_queryset_only(self):
        """
        Regression test for #834.
        """
        view = GetQuerysetView.as_view()
        request = factory.get('/get-queryset/')
        view(request).render()
        # Used to raise "issubclass() arg 2 must be a class or tuple of classes"
        # here when neither `model' nor `queryset' was specified.

          expected_data = [f for f in self.data if f['decimal'] == search_decimal]
          self.assertEqual(response.data, expected_data)
  
    @unittest.skipUnless(django_filters, 'django-filters not installed')
    def test_filter_with_get_queryset_only(self):
        """
        Regression test for #834.
        """
        view = GetQuerysetView.as_view()
        request = factory.get('/get-queryset/')
        view(request).render()
        # Used to raise "issubclass() arg 2 must be a class or tuple of classes"
        # here when neither `model' nor `queryset' was specified.

      @unittest.skipUnless(django_filters, 'django-filters not installed')
      def test_get_filtered_class_root_view(self):
          """
          GET requests to filtered ListCreateAPIView that have a filter_class set
          should return filtered results.
          """
keep keep add keep keep keep keep keep keep
 Base automatic filterset model on the queryset model.  Fixes #834. 
rest_framework/tests/filters.py