Пример #1
0
def current_user_setup(user):
    session["user_id"] = user.id
    session["last_login"] = user.last_login
    app.session_limiter.on_login(user)
    app.logger.info(
        f"authentication succeeded for user with EDIPI {user.dod_id}")
    Users.update_last_login(user)
Пример #2
0
def test_update_user_with_last_login():
    new_user = UserFactory.create()
    Users.update_last_login(new_user)
    last_login = new_user.last_login
    Users.update_last_login(new_user)
    assert new_user.last_login > last_login
Пример #3
0
def current_user_setup(user):
    session["user_id"] = user.id
    session["last_login"] = user.last_login
    app.session_limiter.on_login(user)
    Users.update_last_login(user)