def test_session_expires_without_backend_support(app, client):
    # set expiration to 1 second
    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/')

    # assert that the session has a non-zero timestamp
    sid, created = split_cookie(app, rv)

    assert created != 0

    rv = client.get('/dump-session/')
    s = json_dec(rv.data)
    assert s['k1'] == 'value1'

    # sleep two seconds
    time.sleep(2)

    rv = client.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/original