mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-04 23:17:20 +08:00
refactor(schemas): 统一 message/notification 命名边界,旧名收敛至兼容映射表
- notification 域:渠道能力(MessageChannel→NotificationChannel、ChannelCapability* 迁入 notification.py) - message 域:消息收发(Notification→Message、NotificationType→MessageType、CommingMessage→IncomingMessage、NotificationHistoryItem→MessageHistoryItem、NotificationClear*→MessageClear*) - Agent 工具契约:send_notification_message→send_message、notification_callback→message_callback - 源码不保留旧名物理别名,旧导入经 app/runtime/compat/manifest.py SYMBOL_ALIASES 惰性解析 - API 路径与持久化键冻结不变,前端零改动 - 新增兼容守护测试与 docs/rules/07 命名边界规范
This commit is contained in:
@@ -5,7 +5,7 @@ from app.domain.context import MediaInfo
|
||||
from app.domain.meta.metabase import MetaBase
|
||||
from app.schemas import TransferInfo
|
||||
from app.schemas.tmdb import TmdbEpisode
|
||||
from app.schemas.types import ContentType, MediaType, NotificationType
|
||||
from app.schemas.types import ContentType, MediaType, MessageType
|
||||
|
||||
|
||||
def test_send_transfer_message_passes_episode_info_to_template_context() -> None:
|
||||
@@ -41,7 +41,7 @@ def test_send_transfer_message_passes_episode_info_to_template_context() -> None
|
||||
)
|
||||
|
||||
message = post_message.call_args.args[0]
|
||||
assert message.mtype == NotificationType.Organize
|
||||
assert message.mtype == MessageType.Organize
|
||||
assert message.ctype == ContentType.OrganizeSuccess
|
||||
assert post_message.call_args.kwargs["episodes_info"] is episodes_info
|
||||
assert post_message.call_args.kwargs["season_episode"] == "S01 E01"
|
||||
|
||||
Reference in New Issue
Block a user