Convert _rpc_show_config to static method

This commit is contained in:
Matthias
2020-11-08 11:26:02 +01:00
parent b8f6f09de8
commit 2af1c80fd5
5 changed files with 19 additions and 13 deletions

View File

@@ -14,7 +14,7 @@ from freqtrade.__init__ import __version__
from freqtrade.loggers import setup_logging, setup_logging_pre
from freqtrade.persistence import PairLocks, Trade
from freqtrade.rpc.api_server import BASE_URI, ApiServer
from freqtrade.state import State
from freqtrade.state import RunMode, State
from tests.conftest import create_mock_trades, get_patched_freqtradebot, log_has, patch_get_signal
@@ -26,7 +26,7 @@ _TEST_PASS = "SuperSecurePassword1!"
def botclient(default_conf, mocker):
setup_logging_pre()
setup_logging(default_conf)
default_conf['runmode'] = RunMode.DRY_RUN
default_conf.update({"api_server": {"enabled": True,
"listen_ip_address": "127.0.0.1",
"listen_port": 8080,

View File

@@ -21,7 +21,7 @@ from freqtrade.loggers import setup_logging
from freqtrade.persistence import PairLocks, Trade
from freqtrade.rpc import RPCMessageType
from freqtrade.rpc.telegram import Telegram, authorized_only
from freqtrade.state import State
from freqtrade.state import RunMode, State
from freqtrade.strategy.interface import SellType
from tests.conftest import (create_mock_trades, get_patched_freqtradebot, log_has, patch_exchange,
patch_get_signal, patch_whitelist)
@@ -1309,6 +1309,7 @@ def test_show_config_handle(default_conf, update, mocker) -> None:
_init=MagicMock(),
_send_msg=msg_mock
)
default_conf['runmode'] = RunMode.DRY_RUN
freqtradebot = get_patched_freqtradebot(mocker, default_conf)
telegram = Telegram(freqtradebot)