From 8c9dea988cf0665744dba54c7b9c0b4c2dfd3cfe Mon Sep 17 00:00:00 2001 From: Theagainmen <24569139+Theagainmen@users.noreply.github.com> Date: Wed, 10 Jun 2020 16:55:47 +0200 Subject: [PATCH] Now supports both commands & fixed test --- freqtrade/rpc/telegram.py | 6 ++---- tests/rpc/test_rpc_telegram.py | 7 +++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index e7a8971ec..006baee60 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -95,10 +95,8 @@ class Telegram(RPC): CommandHandler('performance', self._performance), CommandHandler('daily', self._daily), CommandHandler('count', self._count), - #CommandHandler('reload_conf', self._reload_config), - CommandHandler(('reload_config' or 'reload_conf'), self._reload_config), - #CommandHandler('show_conf', self._reload_config), - CommandHandler('show_config' or 'show_conf', self._show_config), + CommandHandler(['reload_config', 'reload_conf'], self._reload_config), + CommandHandler(['show_config', 'show_conf'], self._show_config), CommandHandler('stopbuy', self._stopbuy), CommandHandler('whitelist', self._whitelist), CommandHandler('blacklist', self._blacklist), diff --git a/tests/rpc/test_rpc_telegram.py b/tests/rpc/test_rpc_telegram.py index ce0c9d1f0..b19c6d9ee 100644 --- a/tests/rpc/test_rpc_telegram.py +++ b/tests/rpc/test_rpc_telegram.py @@ -72,10 +72,9 @@ def test_init(default_conf, mocker, caplog) -> None: assert start_polling.start_polling.call_count == 1 message_str = ("rpc.telegram is listening for following commands: [['status'], ['profit'], " - "['balance'], ['start'], ['stop'], ['forcesell'], ['forcebuy'], " - "['performance'], ['daily'], ['count'], ['reload_config'], " - "['show_config'], ['stopbuy'], ['whitelist'], " - "['blacklist'], ['edge'], ['help'], ['version']]") + "['balance'], ['start'], ['stop'], ['forcesell'], ['forcebuy'], ['performance'], " + "['daily'], ['count'], ['reload_config', 'reload_conf'], ['show_config', 'show_conf'], " + "['stopbuy'], ['whitelist'], ['blacklist'], ['edge'], ['help'], ['version']]") assert log_has(message_str, caplog)