

def process_response(self, request, response):
    assert hasattr(response, 'user'), '`user` is not set on request'
    assert request.user.is_authenticated(), '`user` is not authenticated'
    return response

dataset/ETHPy150Open tomchristie/django-rest-framework/tests/test_middleware.py MyMiddleware.process_response/VarMisuse@17/19 `request`->`response`