From f2340e86cbd35cc0a95efbbca3dfbba571591e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Casaj=C3=BAs?= Date: Fri, 29 May 2026 15:31:10 +0200 Subject: [PATCH] Clear test --- .python-version | 2 +- tests/api/test_user_info.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.python-version b/.python-version index 04e20791..251b3507 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.12.8 +3.10.16 diff --git a/tests/api/test_user_info.py b/tests/api/test_user_info.py index 88c7a170..8d780902 100644 --- a/tests/api/test_user_info.py +++ b/tests/api/test_user_info.py @@ -87,6 +87,10 @@ def test_wrong_api_key(flask_client): def test_create_api_key_without_sudo(flask_client): login(flask_client) + # login sets sudo_time in the session; clear it to simulate expired sudo + with flask_client.session_transaction() as sess: + sess.pop("sudo_time", None) + # create api key r = flask_client.post(url_for("api.create_api_key"), json={"device": "Test device"})