mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
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.
This commit is contained in:
parent
365d175100
commit
19eaf5d956
1 changed files with 4 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue