

def test_orders_queryset(self):
    'Orders queryset in context according to sort params.'
    req = RequestFactory().get('/a/url', {
        'sortfield': 'name',
        'sortdirection': 'asc',
    })
    qs = Mock()
    self.on_template_response({
        'ctx_name': qs,
    }, request=qs)
    qs.order_by.assert_called_with('name')

dataset/ETHPy150Open mozilla/moztrap/tests/view/lists/test_sort.py SortDecoratorTest.test_orders_queryset/VarMisuse@58/101 `req`->`qs`