From 64d4821fae2f0fbd7f4035c2e5be44f1d62cf744 Mon Sep 17 00:00:00 2001 From: Colin Maudry Date: Tue, 30 Jun 2026 21:49:51 +0200 Subject: [PATCH] =?UTF-8?q?fix(tests):=20met=20=C3=A0=20jour=20le=20pr?= =?UTF-8?q?=C3=A9fixe=20de=20token=20decpinfo=5F=20=E2=86=92=20colibre=5F?= =?UTF-8?q?=20#57?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- tests/api/test_tokens_cli.py | 2 +- tests/api/test_tokens_db.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/api/test_tokens_cli.py b/tests/api/test_tokens_cli.py index 24b7d87..dd2ef78 100644 --- a/tests/api/test_tokens_cli.py +++ b/tests/api/test_tokens_cli.py @@ -9,7 +9,7 @@ def test_create_prints_plaintext_token_once(temp_db, capsys): rc = _run(["create", "--label", "alice"], env={"USERS_DB_PATH": str(temp_db)}) out = capsys.readouterr().out assert rc == 0 - assert "decpinfo_" in out + assert "colibre_" in out tokens = tokens_db.list_tokens(temp_db) assert len(tokens) == 1 assert tokens[0]["label"] == "alice" diff --git a/tests/api/test_tokens_db.py b/tests/api/test_tokens_db.py index 91ca0b0..92a05ef 100644 --- a/tests/api/test_tokens_db.py +++ b/tests/api/test_tokens_db.py @@ -13,8 +13,8 @@ def test_init_schema_creates_table(temp_db): def test_create_token_returns_plaintext_and_stores_hash(temp_db): token, token_id = tokens_db.create_token(temp_db, "test-label") - assert token.startswith("decpinfo_") - assert len(token) == len("decpinfo_") + 64 # 32 octets hex = 64 chars + assert token.startswith("colibre_") + assert len(token) == len("colibre_") + 64 # 32 octets hex = 64 chars assert token_id >= 1 with sqlite3.connect(str(temp_db)) as conn: @@ -38,7 +38,7 @@ def test_get_token_by_plaintext_returns_row(temp_db): def test_get_token_unknown_returns_none(temp_db): - assert tokens_db.get_token_by_plaintext(temp_db, "decpinfo_zzz") is None + assert tokens_db.get_token_by_plaintext(temp_db, "colibre_zzz") is None def test_revoke_token_sets_revoked_at(temp_db):