def create_session_mock():
    session = mock.Mock()
    session._cache = weakref.WeakValueDictionary()
    session._emitters = []
    session._callback_handles = set()
    return session
Create a :class:`spotify.Session` mock for testing.
dataset/ETHPy150Open mopidy/pyspotify/tests/__init__.py/create_session_mock