Peach: Local-first video metadata scraper and media manager.
test(api): 隔离各用例的登录限流计数
longmeidaodd4eb810856a
diff --git a/tests/test_fastapi_api.py b/tests/test_fastapi_api.pyindex b4fa93b8c..546d4544e 100644--- a/tests/test_fastapi_api.py+++ b/tests/test_fastapi_api.py@@ -6,6 +6,7 @@ import jsonimport sqlite3import tempfileimport unittest+from collections import OrderedDictfrom contextlib import closingfrom pathlib import Pathfrom unittest.mock import patch@@ -197,6 +198,7 @@ class RobotsTests(unittest.IsolatedAsyncioTestCase):@unittest.skipUnless(HAS_DEPS, "FastAPI/httpx 尚未安装")class FastApiContractTests(unittest.IsolatedAsyncioTestCase):async def asyncSetUp(self):+ self.enterContext(patch.object(routes_auth, "_ATTEMPTS", OrderedDict()))self.tmp = tempfile.TemporaryDirectory()self.root = Path(self.tmp.name)self.db = self.root / "ledger.db"