def setup_form_view(view, request, form, *args, **kwargs):
    view.request = request
    try:
        view.request.user = request.user
    except AttributeError:
        view.request.user = UserFactory()
    view.args = args
    view.kwargs = kwargs
    view.form = form
    return view
Fixes reference paths that are not using environment vars
dataset/ETHPy150Open CenterForOpenScience/osf.io/admin_tests/utilities.py/setup_form_view--crossover with--dataset/ETHPy150Open eoyilmaz/anima/anima/env/mayaEnv/toolbox.py/Reference.fix_reference_paths