mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-16 12:51:14 +00:00
Update exchange tests to config error in a few places
This commit is contained in:
@@ -11,8 +11,8 @@ from numpy import NaN
|
|||||||
from pandas import DataFrame
|
from pandas import DataFrame
|
||||||
|
|
||||||
from freqtrade.enums import CandleType, MarginMode, RunMode, TradingMode
|
from freqtrade.enums import CandleType, MarginMode, RunMode, TradingMode
|
||||||
from freqtrade.exceptions import (DDosProtection, DependencyException, ExchangeError,
|
from freqtrade.exceptions import (ConfigurationError, DDosProtection, DependencyException,
|
||||||
InsufficientFundsError, InvalidOrderException,
|
ExchangeError, InsufficientFundsError, InvalidOrderException,
|
||||||
OperationalException, PricingError, TemporaryError)
|
OperationalException, PricingError, TemporaryError)
|
||||||
from freqtrade.exchange import (Binance, Bybit, Exchange, Kraken, market_is_active,
|
from freqtrade.exchange import (Binance, Bybit, Exchange, Kraken, market_is_active,
|
||||||
timeframe_to_prev_date)
|
timeframe_to_prev_date)
|
||||||
@@ -595,7 +595,7 @@ def test_validate_stakecurrency_error(default_conf, mocker, caplog):
|
|||||||
mocker.patch(f'{EXMS}.validate_pairs')
|
mocker.patch(f'{EXMS}.validate_pairs')
|
||||||
mocker.patch(f'{EXMS}.validate_timeframes')
|
mocker.patch(f'{EXMS}.validate_timeframes')
|
||||||
mocker.patch(f'{EXMS}._load_async_markets')
|
mocker.patch(f'{EXMS}._load_async_markets')
|
||||||
with pytest.raises(OperationalException,
|
with pytest.raises(ConfigurationError,
|
||||||
match=r'XRP is not available as stake on .*'
|
match=r'XRP is not available as stake on .*'
|
||||||
'Available currencies are: BTC, ETH, USDT'):
|
'Available currencies are: BTC, ETH, USDT'):
|
||||||
Exchange(default_conf)
|
Exchange(default_conf)
|
||||||
@@ -800,12 +800,12 @@ def test_validate_timeframes_failed(default_conf, mocker):
|
|||||||
mocker.patch(f'{EXMS}.validate_pairs')
|
mocker.patch(f'{EXMS}.validate_pairs')
|
||||||
mocker.patch(f'{EXMS}.validate_stakecurrency')
|
mocker.patch(f'{EXMS}.validate_stakecurrency')
|
||||||
mocker.patch(f'{EXMS}.validate_pricing')
|
mocker.patch(f'{EXMS}.validate_pricing')
|
||||||
with pytest.raises(OperationalException,
|
with pytest.raises(ConfigurationError,
|
||||||
match=r"Invalid timeframe '3m'. This exchange supports.*"):
|
match=r"Invalid timeframe '3m'. This exchange supports.*"):
|
||||||
Exchange(default_conf)
|
Exchange(default_conf)
|
||||||
default_conf["timeframe"] = "15s"
|
default_conf["timeframe"] = "15s"
|
||||||
|
|
||||||
with pytest.raises(OperationalException,
|
with pytest.raises(ConfigurationError,
|
||||||
match=r"Timeframes < 1m are currently not supported by Freqtrade."):
|
match=r"Timeframes < 1m are currently not supported by Freqtrade."):
|
||||||
Exchange(default_conf)
|
Exchange(default_conf)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user