def setup_view(view, request, *args, **kwargs):

    view.request = request
    view.args = args
    view.kwargs = kwargs

    return view
Mimic as_view() returned callable, but returns view instance.
dataset/ETHPy150Open peopledoc/django-generic-filters/django_genericfilters/tests/views.py/setup_view