diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index 10bbc854a..34802f920 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -304,9 +304,9 @@ class RPC(object): return '*Status:* `already stopped`' - def rpc_reload_conf(self) -> str: + def _rpc_reload_conf(self) -> str: """ Handler for reload_conf. """ - self.freqtrade.state = State.RELOAD_CONF + self._freqtrade.state = State.RELOAD_CONF return '*Status:* `Reloading config ...`' # FIX: no test for this!!!! diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index e9091eb2b..4dd23971b 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -289,8 +289,8 @@ class Telegram(RPC): :param update: message update :return: None """ - msg = self.rpc_reload_conf() - self.send_msg(msg, bot=bot) + msg = self._rpc_reload_conf() + self._send_msg(msg, bot=bot) @authorized_only def _forcesell(self, bot: Bot, update: Update) -> None: diff --git a/freqtrade/tests/rpc/test_rpc_telegram.py b/freqtrade/tests/rpc/test_rpc_telegram.py index 68afa7587..f022c09e4 100644 --- a/freqtrade/tests/rpc/test_rpc_telegram.py +++ b/freqtrade/tests/rpc/test_rpc_telegram.py @@ -706,7 +706,7 @@ def test_reload_conf_handle(default_conf, update, mocker) -> None: mocker.patch.multiple( 'freqtrade.rpc.telegram.Telegram', _init=MagicMock(), - send_msg=msg_mock + _send_msg=msg_mock ) mocker.patch('freqtrade.freqtradebot.RPCManager', MagicMock())