Change stoploss_on_exchange in freqtradebot

This commit is contained in:
Matthias
2019-08-11 19:43:57 +02:00
parent e02e64fc07
commit 4b4fcc7034
3 changed files with 9 additions and 37 deletions

View File

@@ -272,34 +272,6 @@ def test_strategy_override_order_types(caplog):
StrategyResolver(config)
def test_strategy_override_order_types_dryrun(caplog):
caplog.set_level(logging.INFO)
order_types = {
'buy': 'market',
'sell': 'limit',
'stoploss': 'limit',
'stoploss_on_exchange': True,
}
config = {
'strategy': 'DefaultStrategy',
'order_types': order_types,
'dry_run': True,
}
resolver = StrategyResolver(config)
assert resolver.strategy.order_types
for method in ['buy', 'sell', 'stoploss', 'stoploss_on_exchange']:
assert resolver.strategy.order_types[method] == order_types[method]
assert log_has("Disabling stoploss_on_exchange during dry-run.", caplog.record_tuples)
assert log_has("Override strategy 'order_types' with value in config file:"
" {'buy': 'market', 'sell': 'limit', 'stoploss': 'limit',"
" 'stoploss_on_exchange': False}.", caplog.record_tuples)
def test_strategy_override_order_tif(caplog):
caplog.set_level(logging.INFO)