integrated BASE64 encoded strategy loading
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# pragma pylint: disable=missing-docstring, protected-access, C0103
|
||||
import logging
|
||||
import os
|
||||
from base64 import urlsafe_b64encode
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -50,6 +51,14 @@ def test_load_strategy(result):
|
||||
assert 'adx' in resolver.strategy.populate_indicators(result)
|
||||
|
||||
|
||||
def test_load_strategy_byte64(result):
|
||||
with open("freqtrade/tests/strategy/test_strategy.py", "r") as file:
|
||||
encoded_string = urlsafe_b64encode(file.read().encode("utf-8")).decode("utf-8")
|
||||
resolver = StrategyResolver({'strategy': 'TestStrategy:{}'.format(encoded_string)})
|
||||
assert hasattr(resolver.strategy, 'populate_indicators')
|
||||
assert 'adx' in resolver.strategy.populate_indicators(result)
|
||||
|
||||
|
||||
def test_load_strategy_invalid_directory(result, caplog):
|
||||
resolver = StrategyResolver()
|
||||
extra_dir = os.path.join('some', 'path')
|
||||
|
Reference in New Issue
Block a user