chore: 迁移服务器前同步本地修改

This commit is contained in:
2026-08-05 21:26:13 +08:00
parent aa47a19e98
commit 1a914a2517
73 changed files with 908 additions and 1961 deletions
+5 -5
View File
@@ -78,7 +78,7 @@ def test_extract_plain_text_handles_unknown_type():
def regulatory_actor(fake_actors):
"""注入一个 regulatory_node Mock,默认返回固定的 MessageResponse。"""
inner = MagicMock()
inner.working.remote = AsyncMock(
inner.working = AsyncMock(
return_value=MessageResponse(
platform="onebot", platform_id="private:1234", reply_message="pong"
)
@@ -92,7 +92,7 @@ async def test_dispatch_event_ignores_non_message(regulatory_actor):
{"post_type": "meta_event", "meta_event_type": "heartbeat"}
)
assert res is None
regulatory_actor.working.remote.assert_not_called()
regulatory_actor.working.assert_not_called()
async def test_dispatch_event_ignores_empty_text(regulatory_actor):
@@ -105,7 +105,7 @@ async def test_dispatch_event_ignores_empty_text(regulatory_actor):
}
)
assert res is None
regulatory_actor.working.remote.assert_not_called()
regulatory_actor.working.assert_not_called()
async def test_dispatch_event_private_message_returns_quick_reply(regulatory_actor):
@@ -140,7 +140,7 @@ async def test_dispatch_event_group_message_includes_at_sender(regulatory_actor)
async def test_dispatch_event_swallows_actor_error(regulatory_actor):
regulatory_actor.working.remote = AsyncMock(side_effect=RuntimeError("ray fail"))
regulatory_actor.working = AsyncMock(side_effect=RuntimeError("ray fail"))
payload = {
"post_type": "message",
"message_type": "private",
@@ -153,7 +153,7 @@ async def test_dispatch_event_swallows_actor_error(regulatory_actor):
async def test_dispatch_event_returns_none_when_reply_empty(fake_actors):
inner = MagicMock()
inner.working.remote = AsyncMock(
inner.working = AsyncMock(
return_value=MessageResponse(
platform="onebot", platform_id="private:1", reply_message=""
)