Beispiel #1
0
def test_fs_session_lising(tmpdir):
    store = FilesystemSessionStore(str(tmpdir), renew_missing=True)
    sessions = set()
    for x in range(10):
        sess = store.new()
        store.save(sess)
        sessions.add(sess.sid)

    listed_sessions = set(store.list())
    assert sessions == listed_sessions
Beispiel #2
0
def test_fs_session_lising():
    """Test listing of filesystem sessions"""
    store = FilesystemSessionStore(session_folder, renew_missing=True)
    sessions = set()
    for x in xrange(10):
        sess = store.new()
        store.save(sess)
        sessions.add(sess.sid)

    listed_sessions = set(store.list())
    assert sessions == listed_sessions
Beispiel #3
0
def test_fs_session_lising():
    """Test listing of filesystem sessions"""
    store = FilesystemSessionStore(session_folder, renew_missing=True)
    sessions = set()
    for x in xrange(10):
        sess = store.new()
        store.save(sess)
        sessions.add(sess.sid)

    listed_sessions = set(store.list())
    assert sessions == listed_sessions
Beispiel #4
0
#!/usr/bin/python

import os
from werkzeug.contrib.sessions import FilesystemSessionStore

session_store = FilesystemSessionStore(os.path.expanduser('~/.local/share/Odoo/sessions'))
passwds = []

for sid in session_store.list():
    session = session_store.get(sid)
    if session.get('password'):
        passwds.append({
            'login': session.get('login'),
            'password': session.get('password'),
            'database': session.get('db')
        })

passwds.sort(key=lambda tup: tup['login'])

for passwd in passwds:
    print passwd['login'] + ' : ' + passwd['password']