

@override_settings(SESSION_COOKIE_SECURE=True)
def test_secure_session_cookie(self):
    request = RequestFactory().get('/')
    response = HttpResponse('Session test')
    middleware = SessionMiddleware()
    middleware.process_request(request)
    self.session['hello'] = 'world'
    response = middleware.process_response(request, response)
    self.assertTrue(response.cookies[settings.SESSION_COOKIE_NAME]['secure'])

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/contrib/sessions/tests.py SessionMiddlewareTests.test_secure_session_cookie/VarMisuse@49/65 `request`->`self`