mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-14 03:41:14 +00:00
test: improve candle type verification test
This commit is contained in:
@@ -6646,3 +6646,23 @@ def test_verify_candle_type_support(default_conf, mocker):
|
||||
match=r"Exchange .* does not support fetching premiumindex candles\.",
|
||||
):
|
||||
exchange.verify_candle_type_support(CandleType.PREMIUMINDEX)
|
||||
|
||||
type(api_mock).has = PropertyMock(
|
||||
return_value={
|
||||
"fetchFundingRateHistory": False,
|
||||
"fetchIndexOHLCV": False,
|
||||
"fetchMarkOHLCV": False,
|
||||
"fetchPremiumIndexOHLCV": True,
|
||||
}
|
||||
)
|
||||
for candle_type in [
|
||||
CandleType.FUNDING_RATE,
|
||||
CandleType.INDEX,
|
||||
CandleType.MARK,
|
||||
]:
|
||||
with pytest.raises(
|
||||
OperationalException,
|
||||
match=rf"Exchange .* does not support fetching {candle_type.value} candles\.",
|
||||
):
|
||||
exchange.verify_candle_type_support(candle_type)
|
||||
exchange.verify_candle_type_support(CandleType.PREMIUMINDEX)
|
||||
|
||||
Reference in New Issue
Block a user