Update tests for new config structure

This commit is contained in:
Matthias
2021-06-26 16:39:01 +02:00
parent 1067a9f356
commit 0235868c66
5 changed files with 27 additions and 32 deletions

View File

@@ -290,14 +290,12 @@ def test_strategy_override_use_sell_signal(caplog, default_conf):
assert strategy.use_sell_signal
assert isinstance(strategy.use_sell_signal, bool)
# must be inserted to configuration
assert 'use_sell_signal' in default_conf['ask_strategy']
assert default_conf['ask_strategy']['use_sell_signal']
assert 'use_sell_signal' in default_conf
assert default_conf['use_sell_signal']
default_conf.update({
'strategy': 'DefaultStrategy',
'ask_strategy': {
'use_sell_signal': False,
},
'use_sell_signal': False,
})
strategy = StrategyResolver.load_strategy(default_conf)
@@ -315,14 +313,12 @@ def test_strategy_override_use_sell_profit_only(caplog, default_conf):
assert not strategy.sell_profit_only
assert isinstance(strategy.sell_profit_only, bool)
# must be inserted to configuration
assert 'sell_profit_only' in default_conf['ask_strategy']
assert not default_conf['ask_strategy']['sell_profit_only']
assert 'sell_profit_only' in default_conf
assert not default_conf['sell_profit_only']
default_conf.update({
'strategy': 'DefaultStrategy',
'ask_strategy': {
'sell_profit_only': True,
},
'sell_profit_only': True,
})
strategy = StrategyResolver.load_strategy(default_conf)