diff --git a/freqtrade/exchange/__init__.py b/freqtrade/exchange/__init__.py index bcb539996..fbc84c9b9 100644 --- a/freqtrade/exchange/__init__.py +++ b/freqtrade/exchange/__init__.py @@ -410,7 +410,7 @@ class Exchange(object): logger.info("downloaded %s with length %s.", pair, len(data)) return data - def refresh_tickers(self, pair_list: List[str], ticker_interval: str) -> bool: + def refresh_tickers(self, pair_list: List[str], ticker_interval: str) -> None: """ Refresh tickers asyncronously and return the result. """ @@ -418,8 +418,6 @@ class Exchange(object): asyncio.get_event_loop().run_until_complete( self.async_get_candles_history(pair_list, ticker_interval)) - return True - async def async_get_candles_history(self, pairs: List[str], tick_interval: str) -> List[Tuple[str, List]]: """Download ohlcv history for pair-list asyncronously """ diff --git a/freqtrade/tests/exchange/test_exchange.py b/freqtrade/tests/exchange/test_exchange.py index f752da0a3..3c90f425c 100644 --- a/freqtrade/tests/exchange/test_exchange.py +++ b/freqtrade/tests/exchange/test_exchange.py @@ -581,10 +581,10 @@ def test_get_history(default_conf, mocker, caplog): ] pair = 'ETH/BTC' - async def mock_cacndle_hist(pair, tick_interval, since_ms): + async def mock_candle_hist(pair, tick_interval, since_ms): return pair, tick - exchange._async_get_candle_history = Mock(wraps=mock_cacndle_hist) + exchange._async_get_candle_history = Mock(wraps=mock_candle_hist) # one_call calculation * 1.8 should do 2 calls since = 5 * 60 * 500 * 1.8 print(f"since = {since}") diff --git a/freqtrade/tests/test_freqtradebot.py b/freqtrade/tests/test_freqtradebot.py index 6971ec0dd..5e982f11a 100644 --- a/freqtrade/tests/test_freqtradebot.py +++ b/freqtrade/tests/test_freqtradebot.py @@ -43,7 +43,7 @@ def patch_get_signal(freqtrade: FreqtradeBot, value=(True, False)) -> None: :return: None """ freqtrade.strategy.get_signal = lambda e, s, t: value - freqtrade.exchange.refresh_tickers = lambda p, i: True + freqtrade.exchange.refresh_tickers = lambda p, i: None def patch_RPCManager(mocker) -> MagicMock: