Merge pull request #1031 from freqtrade/feat/update_configdict

Update config dict with attributes loaded from strategy
This commit is contained in:
Samuel Husso
2018-07-16 10:00:46 +03:00
committed by GitHub
2 changed files with 15 additions and 1 deletions

View File

@@ -74,13 +74,21 @@ def test_load_not_found_strategy():
def test_strategy(result):
resolver = StrategyResolver({'strategy': 'DefaultStrategy'})
config = {'strategy': 'DefaultStrategy'}
resolver = StrategyResolver(config)
assert hasattr(resolver.strategy, 'minimal_roi')
assert resolver.strategy.minimal_roi[0] == 0.04
assert config["minimal_roi"]['0'] == 0.04
assert hasattr(resolver.strategy, 'stoploss')
assert resolver.strategy.stoploss == -0.10
assert config['stoploss'] == -0.10
assert hasattr(resolver.strategy, 'ticker_interval')
assert resolver.strategy.ticker_interval == '5m'
assert config['ticker_interval'] == '5m'
assert hasattr(resolver.strategy, 'populate_indicators')
assert 'adx' in resolver.strategy.populate_indicators(result)