      class MisconfiguredFilter(django_filters.FilterSet):
          text = django_filters.CharFilter(lookup_type='icontains')
  
  
      class IncorrectlyConfiguredRootView(generics.ListCreateAPIView):
          model = FilterableItem
          filter_class = MisconfiguredFilter
 
</s> remove # These classes are used to test a misconfigured filter class.
class MisconfiguredFilter(django_filters.FilterSet):
    text = django_filters.CharFilter(lookup_type='icontains')
    class Meta:
        model = BasicModel
        fields = ['text']
 </s> add     # These classes are used to test a misconfigured filter class.
    class MisconfiguredFilter(django_filters.FilterSet):
        text = django_filters.CharFilter(lookup_type='icontains') </s> remove class IncorrectlyConfiguredRootView(generics.ListCreateAPIView):
    model = FilterableItem
    filter_class = MisconfiguredFilter
 </s> add     class IncorrectlyConfiguredRootView(generics.ListCreateAPIView):
        model = FilterableItem
        filter_class = MisconfiguredFilter </s> remove class FilterClassRootView(generics.ListCreateAPIView):
    model = FilterableItem
    filter_class = SeveralFieldsFilter
 </s> add         class Meta:
            model = FilterableItem
            fields = ['text', 'decimal', 'date']
        class Meta:
            model = BasicModel
            fields = ['text']
      class MisconfiguredFilter(django_filters.FilterSet):
          text = django_filters.CharFilter(lookup_type='icontains')
  
        class Meta:
            model = BasicModel
            fields = ['text']
  
      class IncorrectlyConfiguredRootView(generics.ListCreateAPIView):
          model = FilterableItem
          filter_class = MisconfiguredFilter
keep keep add keep keep keep keep
 Make filtering optional, and pluggable. 
rest_framework/tests/filterset.py