mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
Merge branch 'develop' into dependabot/pip/develop/sqlalchemy-2.0.26
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
markdown==3.5.2
|
||||
mkdocs==1.5.3
|
||||
mkdocs-material==9.5.8
|
||||
mkdocs-material==9.5.9
|
||||
mdx_truly_sane_lists==1.3
|
||||
pymdown-extensions==10.7
|
||||
jinja2==3.1.3
|
||||
|
||||
@@ -1777,13 +1777,9 @@ class Telegram(RPCHandler):
|
||||
msg += f"\nUpdated: {datetime.now().ctime()}"
|
||||
if not query.message:
|
||||
return
|
||||
chat_id = query.message.chat_id
|
||||
message_id = query.message.message_id
|
||||
|
||||
try:
|
||||
await self._app.bot.edit_message_text(
|
||||
chat_id=chat_id,
|
||||
message_id=message_id,
|
||||
await query.edit_message_text(
|
||||
text=msg,
|
||||
parse_mode=parse_mode,
|
||||
reply_markup=reply_markup
|
||||
|
||||
@@ -10,8 +10,8 @@ coveralls==3.3.1
|
||||
ruff==0.2.1
|
||||
mypy==1.8.0
|
||||
pre-commit==3.6.1
|
||||
pytest==7.4.4
|
||||
pytest-asyncio==0.23.4
|
||||
pytest==8.0.0
|
||||
pytest-asyncio==0.23.5
|
||||
pytest-cov==4.1.0
|
||||
pytest-mock==3.12.0
|
||||
pytest-random-order==1.1.1
|
||||
|
||||
@@ -8,5 +8,5 @@ joblib==1.3.2
|
||||
catboost==1.2.2; 'arm' not in platform_machine and python_version < '3.12'
|
||||
lightgbm==4.3.0
|
||||
xgboost==2.0.3
|
||||
tensorboard==2.15.1
|
||||
tensorboard==2.15.2
|
||||
datasieve==0.1.7
|
||||
|
||||
@@ -6,7 +6,7 @@ ccxt==4.2.42
|
||||
cryptography==42.0.2
|
||||
aiohttp==3.9.3
|
||||
SQLAlchemy==2.0.26
|
||||
python-telegram-bot==20.7
|
||||
python-telegram-bot==20.8
|
||||
# can't be hard-pinned due to telegram-bot pinning httpx with ~
|
||||
httpx>=0.24.1
|
||||
arrow==1.3.0
|
||||
|
||||
@@ -2557,22 +2557,22 @@ async def test_telegram__send_msg(default_conf, mocker, caplog) -> None:
|
||||
|
||||
# Test update
|
||||
query = MagicMock()
|
||||
query.edit_message_text = AsyncMock()
|
||||
await telegram._send_msg('test', callback_path="DeadBeef", query=query, reload_able=True)
|
||||
edit_message_text = telegram._app.bot.edit_message_text
|
||||
assert edit_message_text.call_count == 1
|
||||
assert "Updated: " in edit_message_text.call_args_list[0][1]['text']
|
||||
assert query.edit_message_text.call_count == 1
|
||||
assert "Updated: " in query.edit_message_text.call_args_list[0][1]['text']
|
||||
|
||||
telegram._app.bot.edit_message_text = AsyncMock(side_effect=BadRequest("not modified"))
|
||||
query.edit_message_text = AsyncMock(side_effect=BadRequest("not modified"))
|
||||
await telegram._send_msg('test', callback_path="DeadBeef", query=query)
|
||||
assert telegram._app.bot.edit_message_text.call_count == 1
|
||||
assert query.edit_message_text.call_count == 1
|
||||
assert not log_has_re(r"TelegramError: .*", caplog)
|
||||
|
||||
telegram._app.bot.edit_message_text = AsyncMock(side_effect=BadRequest(""))
|
||||
query.edit_message_text = AsyncMock(side_effect=BadRequest(""))
|
||||
await telegram._send_msg('test2', callback_path="DeadBeef", query=query)
|
||||
assert telegram._app.bot.edit_message_text.call_count == 1
|
||||
assert query.edit_message_text.call_count == 1
|
||||
assert log_has_re(r"TelegramError: .*", caplog)
|
||||
|
||||
telegram._app.bot.edit_message_text = AsyncMock(side_effect=TelegramError("DeadBEEF"))
|
||||
query.edit_message_text = AsyncMock(side_effect=TelegramError("DeadBEEF"))
|
||||
await telegram._send_msg('test3', callback_path="DeadBeef", query=query)
|
||||
|
||||
assert log_has_re(r"TelegramError: DeadBEEF! Giving up.*", caplog)
|
||||
|
||||
Reference in New Issue
Block a user