Check if timeframe is available before calling exchange

closes #6517
This commit is contained in:
Matthias
2022-03-11 17:59:57 +01:00
parent 24f480b4ce
commit 11c76c3c89
3 changed files with 33 additions and 15 deletions

View File

@@ -107,6 +107,8 @@ def patch_exchange(mocker, api_mock=None, id='binance', mock_markets=True) -> No
mocker.patch('freqtrade.exchange.Exchange._init_ccxt', MagicMock(return_value=api_mock))
else:
mocker.patch('freqtrade.exchange.Exchange._init_ccxt', MagicMock())
mocker.patch('freqtrade.exchange.Exchange.timeframes', PropertyMock(
return_value=['5m', '15m', '1h', '1d']))
def get_patched_exchange(mocker, config, api_mock=None, id='binance',