Merge pull request #321 from gcarq/log-exceptions

Log exceptions
This commit is contained in:
Janne Sinivirta
2018-01-06 10:14:57 +02:00
committed by GitHub
3 changed files with 13 additions and 2 deletions

View File

@@ -63,3 +63,11 @@ def test_returns_latest_sell_signal(mocker):
return_value=DataFrame([{'sell': 0, 'date': arrow.utcnow()}])
)
assert not get_signal('BTC-ETH', SignalType.SELL)
def test_get_signal_handles_exceptions(mocker):
mocker.patch('freqtrade.analyze.get_ticker_history', return_value=MagicMock())
mocker.patch('freqtrade.analyze.analyze_ticker',
side_effect=Exception('invalid ticker history '))
assert not get_signal('BTC-ETH', SignalType.BUY)