mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
test: Add tests for new behavior
This commit is contained in:
parent
6024903bde
commit
11eaa6d77c
|
@ -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()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user