def test_session_cache_mode(self):
    '\n        `Context.set_session_cache_mode` specifies how sessions are cached.\n        The setting can be retrieved via `Context.get_session_cache_mode`.\n        '
    context = Context(TLSv1_METHOD)
    context.set_session_cache_mode(SESS_CACHE_OFF)
    off = context.set_session_cache_mode(SESS_CACHE_BOTH)
    assert (SESS_CACHE_OFF == off)
    assert (SESS_CACHE_BOTH == context.get_session_cache_mode())
`Context.set_session_cache_mode` specifies how sessions are cached.
The setting can be retrieved via `Context.get_session_cache_mode`.
def test_session_cache_mode(self):
    '\n        `Context.set_session_cache_mode` specifies how sessions are cached.\n        The setting can be retrieved via `Context.get_session_cache_mode`.\n        '
    context = Context(TLSv1_METHOD)
    context.set_session_cache_mode(SESS_CACHE_OFF)
    off = context.set_session_cache_mode(SESS_CACHE_BOTH)
    assert (SESS_CACHE_OFF == off)
    assert (SESS_CACHE_BOTH == context.get_session_cache_mode())