define _rpc_reload_conf as private method

This commit is contained in:
gcarq 2018-06-13 15:29:27 +02:00
parent e14c9e2090
commit 46080f5168
3 changed files with 5 additions and 5 deletions

View File

@ -304,9 +304,9 @@ class RPC(object):
return '*Status:* `already stopped`' return '*Status:* `already stopped`'
def rpc_reload_conf(self) -> str: def _rpc_reload_conf(self) -> str:
""" Handler for reload_conf. """ """ Handler for reload_conf. """
self.freqtrade.state = State.RELOAD_CONF self._freqtrade.state = State.RELOAD_CONF
return '*Status:* `Reloading config ...`' return '*Status:* `Reloading config ...`'
# FIX: no test for this!!!! # FIX: no test for this!!!!

View File

@ -289,8 +289,8 @@ class Telegram(RPC):
:param update: message update :param update: message update
:return: None :return: None
""" """
msg = self.rpc_reload_conf() msg = self._rpc_reload_conf()
self.send_msg(msg, bot=bot) self._send_msg(msg, bot=bot)
@authorized_only @authorized_only
def _forcesell(self, bot: Bot, update: Update) -> None: def _forcesell(self, bot: Bot, update: Update) -> None:

View File

@ -706,7 +706,7 @@ def test_reload_conf_handle(default_conf, update, mocker) -> None:
mocker.patch.multiple( mocker.patch.multiple(
'freqtrade.rpc.telegram.Telegram', 'freqtrade.rpc.telegram.Telegram',
_init=MagicMock(), _init=MagicMock(),
send_msg=msg_mock _send_msg=msg_mock
) )
mocker.patch('freqtrade.freqtradebot.RPCManager', MagicMock()) mocker.patch('freqtrade.freqtradebot.RPCManager', MagicMock())