

def test_session_expires_without_backend_support(app, client):
    app.permanent_session_lifetime = timedelta(seconds=1)
    client.get('/store-in-session/k1/value1/')
    rv = client.get('/dump-session/')
    s = json_dec(rv.data)
    assert (s['k1'] == 'value1')
    rv = client.get('/make-session-permanent/')
    (sid, created) = split_cookie(app, rv)
    assert (created != 0)
    rv = client.get('/dump-session/')
    s = json_dec(rv.data)
    assert (s['k1'] == 'value1')
    time.sleep(2)
    rv = s.get('/dump-session/')
    s = json_dec(rv.data)
    assert (s == {
        
    })

dataset/ETHPy150Open mbr/flask-kvsession/tests/test_flask_kvsession.py test_session_expires_without_backend_support/VarMisuse@124/177 `client`->`s`