mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-26 17:00:23 +00:00
test: Add tests for new behavior
This commit is contained in:
@@ -567,7 +567,15 @@ def test__load_async_markets(default_conf, mocker, caplog):
|
||||
caplog.set_level(logging.DEBUG)
|
||||
|
||||
exchange._api_async.load_markets = get_mock_coro(side_effect=ccxt.BaseError("deadbeef"))
|
||||
with pytest.raises(ccxt.BaseError, match="deadbeef"):
|
||||
with pytest.raises(TemporaryError, match="deadbeef"):
|
||||
exchange._load_async_markets()
|
||||
|
||||
exchange._api_async.load_markets = get_mock_coro(side_effect=ccxt.DDoSProtection("deadbeef"))
|
||||
with pytest.raises(DDosProtection, match="deadbeef"):
|
||||
exchange._load_async_markets()
|
||||
|
||||
exchange._api_async.load_markets = get_mock_coro(side_effect=ccxt.OperationFailed("deadbeef"))
|
||||
with pytest.raises(TemporaryError, match="deadbeef"):
|
||||
exchange._load_async_markets()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user