refactor: unify site chain data port access

This commit is contained in:
jxxghp
2026-08-24 04:25:29 +08:00
parent 286b5836a1
commit 836cbfbbb2
6 changed files with 51 additions and 18 deletions
+4 -1
View File
@@ -209,7 +209,10 @@ class TestSlashCommandInteractions(unittest.TestCase):
)
]
with patch("app.chain.site.SiteOper.list", return_value=fake_sites), patch.object(
with patch(
"app.chain.site.get_chain_site_port",
return_value=SimpleNamespace(list=lambda: fake_sites),
), patch.object(
chain, "post_message"
) as post_message:
chain.remote_list(channel=NotificationChannel.Web, userid="u1", source="web")