Don't load protections from config if strategy defines a property

This commit is contained in:
Matthias
2021-06-17 21:01:22 +02:00
parent 8562e19776
commit e1010ff592
6 changed files with 9 additions and 8 deletions

View File

@@ -70,8 +70,7 @@ def test_protectionmanager(mocker, default_conf):
])
def test_protections_init(mocker, default_conf, timeframe, expected, protconf):
default_conf['timeframe'] = timeframe
default_conf['protections'] = protconf
man = ProtectionManager(default_conf)
man = ProtectionManager(default_conf, protconf)
assert len(man._protection_handlers) == len(protconf)
assert man._protection_handlers[0]._lookback_period == expected[0]
assert man._protection_handlers[0]._stop_duration == expected[1]