mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 08:26:53 +08:00
refactor: reorganize startup persistence boundaries
This commit is contained in:
@@ -352,13 +352,10 @@ def test_agenttask_get_for_user_enforces_ownership(db):
|
||||
assert AgentTask.get_for_user(db.session, task_id, user_id="bob") is None
|
||||
|
||||
|
||||
def test_agenttask_model_queries_keep_no_session_plugin_abi(db, monkeypatch):
|
||||
"""旧插件省略 Session 时仍可按原关键字参数查询 Agent 任务。"""
|
||||
def test_agenttask_model_queries_keep_no_session_plugin_abi(db):
|
||||
"""旧插件省略 Session 时仍由统一 legacy 装饰器按原参数查询。"""
|
||||
task_id = AgentTask.add_task(db.session, **_task("legacy", user_id="legacy-user"))
|
||||
monkeypatch.setattr(
|
||||
"app.db.models.agenttask.run_legacy_sync_query",
|
||||
lambda operation: operation(db.session),
|
||||
)
|
||||
db.session.commit()
|
||||
|
||||
assert AgentTask.get_for_user(
|
||||
task_id=task_id,
|
||||
|
||||
Reference in New Issue
Block a user