mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-30 12:36:55 +08:00
test: update router startup stub contract
This commit is contained in:
@@ -366,7 +366,11 @@ def test_lifespan_warms_engines_before_any_initializer(monkeypatch):
|
||||
monkeypatch.setattr(lifecycle, "get_engine", lambda: calls.append("sync_engine"))
|
||||
monkeypatch.setattr(lifecycle, "get_global_async_engine",
|
||||
lambda: calls.append("async_engine"))
|
||||
monkeypatch.setattr(lifecycle, "init_routers", lambda _app: calls.append("init_routers"))
|
||||
monkeypatch.setattr(
|
||||
lifecycle,
|
||||
"init_routers",
|
||||
lambda _app, _api_prefix: calls.append("init_routers"),
|
||||
)
|
||||
async def _init_modules():
|
||||
"""init_modules 在 v3 是协程,桩也必须可 await。"""
|
||||
calls.append("init_modules")
|
||||
|
||||
Reference in New Issue
Block a user