修复 lint 警告及测试 monkeypatch 引用

This commit is contained in:
2569718930@qq.com
2026-06-16 02:03:47 +08:00
parent dca4f2d618
commit 6d7f213cd9
11 changed files with 31 additions and 31 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
import src.auth.supabase_admin_client as admin_client_module
from types import SimpleNamespace
import src.database.db_manager as db_manager_module
@@ -41,7 +42,7 @@ def test_message_points_sync_to_supabase_metadata_is_throttled(tmp_path, monkeyp
raising=False,
)
monkeypatch.setattr(
db_manager_module.requests,
admin_client_module.requests,
"patch",
lambda *args, **kwargs: calls.append((args, kwargs))
or SimpleNamespace(status_code=204, text="", content=b""),
@@ -78,7 +79,7 @@ def test_manual_point_grant_forces_supabase_metadata_sync(tmp_path, monkeypatch)
raising=False,
)
monkeypatch.setattr(
db_manager_module.requests,
admin_client_module.requests,
"patch",
lambda *args, **kwargs: calls.append((args, kwargs))
or SimpleNamespace(status_code=204, text="", content=b""),