Added support to load strategy directly from a given url

This commit is contained in:
Gert Wohlgemuth
2018-05-09 23:15:24 -07:00
parent 1dbdb880e6
commit 9b68986a2d
3 changed files with 26 additions and 2 deletions

View File

@@ -26,6 +26,15 @@ def test_load_strategy(result):
assert 'adx' in resolver.strategy.populate_indicators(result)
def test_load_strategy_from_url(result):
resolver = StrategyResolver()
resolver._load_strategy('https://raw.githubusercontent.com/berlinguyinca'
'/freqtrade-trading-strategies'
'/master/user_data/strategies/Simple.py')
assert hasattr(resolver.strategy, 'populate_indicators')
assert 'adx' in resolver.strategy.populate_indicators(result)
def test_load_strategy_custom_directory(result):
resolver = StrategyResolver()
extra_dir = os.path.join('some', 'path')