|
|
|
|
@ -455,5 +455,19 @@ def test_set_loggers() -> None:
|
|
|
|
|
assert logging.getLogger('telegram').level is logging.INFO
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_load_config_warn_forcebuy(default_conf, mocker, caplog) -> None:
|
|
|
|
|
default_conf['forcebuy_enable'] = True
|
|
|
|
|
mocker.patch('freqtrade.configuration.open', mocker.mock_open(
|
|
|
|
|
read_data=json.dumps(default_conf)
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
args = Arguments([], '').get_parsed_arg()
|
|
|
|
|
configuration = Configuration(args)
|
|
|
|
|
validated_conf = configuration.load_config()
|
|
|
|
|
|
|
|
|
|
assert validated_conf.get('forcebuy_enable')
|
|
|
|
|
assert log_has('`forcebuy` RPC message enabled.', caplog.record_tuples)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_validate_default_conf(default_conf) -> None:
|
|
|
|
|
validate(default_conf, constants.CONF_SCHEMA)
|
|
|
|
|
|