

def on_response(self, response, decorator=None, request=None):
    'Apply given decorator to dummy view, return given response.'
    decorator = (decorator or response.sort('ctx_name'))
    request = (request or RequestFactory().get('/'))

    @decorator
    def view(request):
        return response
    return view(request)

dataset/ETHPy150Open mozilla/moztrap/tests/view/lists/test_sort.py SortDecoratorTest.on_response/VarMisuse@27/48 `self`->`response`