Introduce .analyze() function for Strategy

Fixing a few tests along the way
This commit is contained in:
Matthias
2020-06-13 18:06:52 +02:00
parent 95f3ac08d4
commit 273aaaff12
4 changed files with 47 additions and 25 deletions

View File

@@ -163,7 +163,7 @@ def patch_get_signal(freqtrade: FreqtradeBot, value=(True, False)) -> None:
:param value: which value IStrategy.get_signal() must return
:return: None
"""
freqtrade.strategy.get_signal = lambda e, s, t: value
freqtrade.strategy.get_signal = lambda e, s: value
freqtrade.exchange.refresh_latest_ohlcv = lambda p: None

View File

@@ -912,6 +912,7 @@ def test_process_informative_pairs_added(default_conf, ticker, mocker) -> None:
refresh_latest_ohlcv=refresh_mock,
)
inf_pairs = MagicMock(return_value=[("BTC/ETH", '1m'), ("ETH/USDT", "1h")])
mocker.patch('freqtrade.strategy.interface.IStrategy.get_signal', return_value=(False, False))
mocker.patch('time.sleep', return_value=None)
freqtrade = FreqtradeBot(default_conf)