From 19eaf5d9567ccce767c2dcf624ef347b2094eed5 Mon Sep 17 00:00:00 2001 From: teknium1 Date: Tue, 17 Mar 2026 01:44:04 -0700 Subject: [PATCH] test: fix telegram mock to include ParseMode constant The MarkdownV2 formatting change imports telegram.constants.ParseMode, which the test mock didn't provide. Add ParseMode to the mock so existing tests continue working. --- tests/tools/test_send_message_tool.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/tools/test_send_message_tool.py b/tests/tools/test_send_message_tool.py index d55998942..b5cb33200 100644 --- a/tests/tools/test_send_message_tool.py +++ b/tests/tools/test_send_message_tool.py @@ -25,8 +25,11 @@ def _make_config(): def _install_telegram_mock(monkeypatch, bot): - telegram_mod = SimpleNamespace(Bot=lambda token: bot) + parse_mode = SimpleNamespace(MARKDOWN_V2="MarkdownV2") + constants_mod = SimpleNamespace(ParseMode=parse_mode) + telegram_mod = SimpleNamespace(Bot=lambda token: bot, constants=constants_mod) monkeypatch.setitem(sys.modules, "telegram", telegram_mod) + monkeypatch.setitem(sys.modules, "telegram.constants", constants_mod) class TestSendMessageTool: