diff --git a/freqtrade/plugins/pairlist/RemotePairList.py b/freqtrade/plugins/pairlist/RemotePairList.py index 0b16b7872..65dc626ab 100644 --- a/freqtrade/plugins/pairlist/RemotePairList.py +++ b/freqtrade/plugins/pairlist/RemotePairList.py @@ -187,7 +187,7 @@ class RemotePairList(IPairList): except Exception as e: pairlist = self.init_check(f'Failed processing JSON data: {type(e)}') else: - pairlist = self.init_check(f'RemotePairList is not of type JSON: ' + pairlist = self.init_check(f'RemotePairList is not of type JSON.' f' {self._pairlist_url}') except requests.exceptions.RequestException: diff --git a/tests/plugins/test_remotepairlist.py b/tests/plugins/test_remotepairlist.py index b21763d47..9d407de9f 100644 --- a/tests/plugins/test_remotepairlist.py +++ b/tests/plugins/test_remotepairlist.py @@ -82,7 +82,7 @@ def test_fetch_pairlist_mock_response_html(mocker, rpl_config): remote_pairlist = RemotePairList(exchange, pairlistmanager, rpl_config, rpl_config['pairlists'][0], 0) - with pytest.raises(OperationalException, match='RemotePairList is not of type JSON, abort.'): + with pytest.raises(OperationalException, match='RemotePairList is not of type JSON.'): remote_pairlist.fetch_pairlist() @@ -107,9 +107,11 @@ def test_fetch_pairlist_timeout_keep_last_pairlist(mocker, rpl_config, caplog): rpl_config['pairlists'][0], 0) remote_pairlist._last_pairlist = ["BTC/USDT", "ETH/USDT", "LTC/USDT"] - + remote_pairlist._init_done = True + pairlist_url = rpl_config['pairlists'][0]['pairlist_url'] pairs, _time_elapsed = remote_pairlist.fetch_pairlist() - assert log_has(f"Was not able to fetch pairlist from: {remote_pairlist._pairlist_url}", caplog) + + assert log_has(f'Error: Was not able to fetch pairlist from: ' f'{pairlist_url}', caplog) assert log_has("Keeping last fetched pairlist", caplog) assert pairs == ["BTC/USDT", "ETH/USDT", "LTC/USDT"]