Reflect IM channel runtime health

This commit is contained in:
taohe
2026-06-11 17:11:55 +08:00
parent dae7c7870e
commit b26b30ac3d
4 changed files with 81 additions and 0 deletions
+10
View File
@@ -73,6 +73,16 @@ def test_feishu_on_message_plain_text():
assert mock_make_inbound.call_args[1]["text"] == "Hello world"
def test_feishu_is_not_running_when_ws_thread_exits():
bus = MessageBus()
channel = FeishuChannel(bus, {"app_id": "test", "app_secret": "test"})
channel._running = True
channel._thread = MagicMock()
channel._thread.is_alive.return_value = False
assert channel.is_running is False
def test_feishu_on_message_rich_text():
bus = MessageBus()
config = {"app_id": "test", "app_secret": "test"}