              filter_backends = (filters.SearchFilter,)
              search_fields = ('title', '^text')
  
          view = SearchListView.as_view()
          request = factory.get('?search=b')
          response = view(request)
          self.assertEqual(
              response.data,
              [
                  {'id': 2, 'title': 'zz', 'text': 'bcd'}
 
</s> remove         request = factory.get('?search=b')
 </s> add         request = factory.get('/', {'search': 'b'}) </s> remove         request = factory.get('?search=zzz')
 </s> add         request = factory.get('/', {'search': 'zzz'}) </s> remove         request = factory.get('?ordering=relateds__count')
 </s> add         request = factory.get('/', {'ordering': 'relateds__count'}) </s> remove         request = factory.get('?ordering=text')
 </s> add         request = factory.get('/', {'ordering': 'text'}) </s> remove         request = factory.get('?ordering=foobar')
 </s> add         request = factory.get('/', {'ordering': 'foobar'})
        request = factory.get('/', {'search': 'b'})
              filter_backends = (filters.SearchFilter,)
              search_fields = ('title', '^text')
  
          view = SearchListView.as_view()
        request = factory.get('/', {'search': 'b'})
          response = view(request)
          self.assertEqual(
              response.data,
              [
                  {'id': 2, 'title': 'zz', 'text': 'bcd'}
keep keep keep keep replace keep keep keep keep keep
 Refactoring due to the previous commit. 
rest_framework/tests/test_filters.py