def METHOD_NAME(self, with_user=True, user=None):
    """Configures a current request, as required by the experiment code"""
    request = RequestFactory()
    if with_user:
        request.user = user or self.user
    self.addCleanup(crum.set_current_request, None)
    crum.set_current_request(request)