                  filter_backends = (filters.OrderingFilter,)
                  serializer_class = serializer_cls
  
              view = OrderingListView.as_view()
              request = factory.get('?ordering=password')
              response = view(request)
  
              if serializer_cls == SensitiveDataSerializer3:
                  username_field = 'user'
              else:
 
</s> remove             request = factory.get('?ordering=-username')
 </s> add             request = factory.get('/', {'ordering': '-username'}) </s> remove         request = factory.get('?ordering=-text')
 </s> add         request = factory.get('/', {'ordering': '-text'}) </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'})
            request = factory.get('/', {'ordering': 'password'})
                  filter_backends = (filters.OrderingFilter,)
                  serializer_class = serializer_cls
  
              view = OrderingListView.as_view()
            request = factory.get('/', {'ordering': 'password'})
              response = view(request)
  
              if serializer_cls == SensitiveDataSerializer3:
                  username_field = 'user'
              else:
keep keep keep keep replace keep keep keep keep keep
 Refactoring due to the previous commit. 
rest_framework/tests/test_filters.py