diff --git a/freqtrade/data/history/history_utils.py b/freqtrade/data/history/history_utils.py index 4e9ac9dcf..64297c7e5 100644 --- a/freqtrade/data/history/history_utils.py +++ b/freqtrade/data/history/history_utils.py @@ -284,7 +284,6 @@ def refresh_backtest_ohlcv_data(exchange: Exchange, pairs: List[str], timeframes # Downloads what is necessary to backtest based on futures data. timeframe = exchange._ft_has['mark_ohlcv_timeframe'] candle_type = CandleType.from_string(exchange._ft_has['mark_ohlcv_price']) - # candle_type = CandleType.MARK # TODO: this could be in most parts to the above. if erase: diff --git a/tests/leverage/test_candletype.py b/tests/leverage/test_candletype.py index 3eb73a07c..ed7991d26 100644 --- a/tests/leverage/test_candletype.py +++ b/tests/leverage/test_candletype.py @@ -14,5 +14,14 @@ from freqtrade.enums import CandleType ('mark', CandleType.MARK), ('premiumIndex', CandleType.PREMIUMINDEX), ]) -def test_candle_type_from_string(input, expected): +def test_CandleType_from_string(input, expected): assert CandleType.from_string(input) == expected + + +@pytest.mark.parametrize('input,expected', [ + ('futures', CandleType.FUTURES), + ('spot', CandleType.SPOT), + ('margin', CandleType.SPOT), +]) +def test_CandleType_get_default(input, expected): + assert CandleType.get_default(input) == expected