From 771449053042ae43a6f950f3b2c53e4441193746 Mon Sep 17 00:00:00 2001 From: xmatthias Date: Wed, 6 Jun 2018 21:24:57 +0200 Subject: [PATCH] Test keyerror exception --- freqtrade/tests/exchange/test_exchange.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/freqtrade/tests/exchange/test_exchange.py b/freqtrade/tests/exchange/test_exchange.py index ff4233eaf..97a723929 100644 --- a/freqtrade/tests/exchange/test_exchange.py +++ b/freqtrade/tests/exchange/test_exchange.py @@ -333,6 +333,10 @@ def test_get_ticker(default_conf, mocker): mocker.patch('freqtrade.exchange._API', api_mock) get_ticker(pair='ETH/BTC', refresh=True) + api_mock.fetch_ticker = MagicMock(return_value={}) + mocker.patch('freqtrade.exchange._API', api_mock) + get_ticker(pair='ETH/BTC', refresh=True) + def make_fetch_ohlcv_mock(data): def fetch_ohlcv_mock(pair, timeframe, since):