async def test_add_new_attempt_of_login(tmpcwd, app): auth = NativeAuthenticator(db=app.db) assert not auth.login_attempts auth.add_login_attempt("username") assert auth.login_attempts["username"]["count"] == 1 auth.add_login_attempt("username") assert auth.login_attempts["username"]["count"] == 2
async def test_add_new_attempt_of_login(tmpcwd, app): auth = NativeAuthenticator(db=app.db) assert not auth.login_attempts auth.add_login_attempt('username') assert auth.login_attempts['username']['count'] == 1 auth.add_login_attempt('username') assert auth.login_attempts['username']['count'] == 2