API: compteur de consommation SQLite asynchrone (#78)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Colin Maudry
2026-05-13 14:31:22 +02:00
parent 04c8bb8b6d
commit 912507b1d9
5 changed files with 122 additions and 3 deletions
+3 -2
View File
@@ -19,12 +19,13 @@ def api_client(monkeypatch, tmp_path):
monkeypatch.setenv("USERS_DB_PATH", str(db_path))
from flask import Flask
from src.api import init_api, tokens_db
from src.api import init_api, tokens_db, tracking
tokens_db.init_schema(db_path)
server = Flask(__name__)
init_api(server)
return server.test_client(), db_path
yield server.test_client(), db_path
tracking.stop_worker()
@pytest.fixture