mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
refactor: use explicit runtime facade getters
This commit is contained in:
@@ -134,7 +134,7 @@ def test_cookiecloud_sync_uses_task_registry(monkeypatch) -> None:
|
||||
"""CookieCloud 手工同步应登记 Scheduler E1 任务而非 Starlette 后台回调。"""
|
||||
registry = _TaskRegistry()
|
||||
scheduler = SimpleNamespace(start=lambda **_kwargs: None)
|
||||
monkeypatch.setattr(site, "Scheduler", lambda: scheduler)
|
||||
monkeypatch.setattr(site, "get_scheduler", lambda: scheduler)
|
||||
|
||||
response = asyncio.run(site.cookie_cloud_sync(registry, SimpleNamespace()))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user