      urlpatterns = patterns('',
          url(r'^(?P<pk>\d+)/$', FilterClassDetailView.as_view(), name='detail-view'),
          url(r'^$', FilterClassRootView.as_view(), name='root-view'),
      )
  
  
  class CommonFilteringTestCase(TestCase):
 
</s> remove                     model = model_cls
 </s> add                     model = queryset.model </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 
        url(r'^get-queryset/$', GetQuerysetView.as_view(),
            name='get-queryset-view'),
      urlpatterns = patterns('',
          url(r'^(?P<pk>\d+)/$', FilterClassDetailView.as_view(), name='detail-view'),
          url(r'^$', FilterClassRootView.as_view(), name='root-view'),
        url(r'^get-queryset/$', GetQuerysetView.as_view(),
            name='get-queryset-view'),
      )
  
  
  class CommonFilteringTestCase(TestCase):
keep keep add keep keep keep keep
 Base automatic filterset model on the queryset model.  Fixes #834. 
rest_framework/tests/filters.py