catch TemporaryError for buy/sell in _process()

This commit is contained in:
gcarq
2018-04-22 20:28:39 +02:00
parent 4c49229b77
commit 5baab91bb5
2 changed files with 5 additions and 5 deletions

View File

@@ -16,7 +16,7 @@ import pytest
import requests
from sqlalchemy import create_engine
from freqtrade import DependencyException, OperationalException
from freqtrade import DependencyException, OperationalException, TemporaryError
from freqtrade.freqtradebot import FreqtradeBot
from freqtrade.persistence import Trade
from freqtrade.state import State
@@ -451,7 +451,7 @@ def test_process_exchange_failures(default_conf, ticker, markets, mocker) -> Non
validate_pairs=MagicMock(),
get_ticker=ticker,
get_markets=markets,
buy=MagicMock(side_effect=requests.exceptions.RequestException)
buy=MagicMock(side_effect=TemporaryError)
)
sleep_mock = mocker.patch('time.sleep', side_effect=lambda _: None)