mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
refactor: 收口 V3 分层架构与插件兼容边界
This commit is contained in:
@@ -10,7 +10,7 @@ from app.db import AsyncSessionFactory, SessionFactory
|
||||
from app.db.oper.message import MessageOper
|
||||
from app.db.models.message import Message as MessageModel
|
||||
from app.db.oper.systemconfig import SystemConfigOper
|
||||
from app.application.messaging.message import MessageHelper
|
||||
from app.application.messaging.message import MessageHelper, MessageQueryService
|
||||
from app.schemas import Message, MessageClearScope
|
||||
from app.schemas.types import MediaType, MessageType, SystemConfigKey
|
||||
|
||||
@@ -107,7 +107,9 @@ def test_notification_clear_marker_filters_history_across_requests() -> None:
|
||||
通过异步接口读取通知标题。
|
||||
"""
|
||||
async with AsyncSessionFactory() as db:
|
||||
messages = await get_notification_message(db=db)
|
||||
messages = await get_notification_message(
|
||||
service=MessageQueryService(MessageOper(db))
|
||||
)
|
||||
return [message.title for message in messages]
|
||||
|
||||
assert asyncio.run(_load_titles()) == ["新媒体通知", "旧系统通知"]
|
||||
|
||||
Reference in New Issue
Block a user