              ordering = ('title',)
              ordering_fields = ('text',)
  
          view = OrderingListView.as_view()
          request = factory.get('?ordering=text')
          response = view(request)
          self.assertEqual(
              response.data,
              [
                  {'id': 1, 'title': 'zyx', 'text': 'abc'},
 
</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'}) </s> remove         request = factory.get('?ordering=relateds__count')
 </s> add         request = factory.get('/', {'ordering': 'relateds__count'}) </s> remove         request = factory.get('?search=b')
 </s> add         request = factory.get('/', {'search': 'b'}) </s> remove         request = factory.get('?search=b')
 </s> add         request = factory.get('/', {'search': 'b'})
        request = factory.get('/', {'ordering': 'text'})
              ordering = ('title',)
              ordering_fields = ('text',)
  
          view = OrderingListView.as_view()
        request = factory.get('/', {'ordering': 'text'})
          response = view(request)
          self.assertEqual(
              response.data,
              [
                  {'id': 1, 'title': 'zyx', 'text': 'abc'},
keep keep keep keep replace keep keep keep keep keep
 Refactoring due to the previous commit. 
rest_framework/tests/test_filters.py