Fix CI failure

This commit is contained in:
Matthias 2021-12-21 19:20:09 +01:00
parent 6ba8b17fdd
commit e5aaef6440
2 changed files with 5 additions and 4 deletions

View File

@ -42,7 +42,7 @@ class PairListManager(LoggingMixin):
if not self._pairlist_handlers: if not self._pairlist_handlers:
raise OperationalException("No Pairlist Handlers defined") raise OperationalException("No Pairlist Handlers defined")
refresh_period = config.get('refresh_period', 1800) refresh_period = config.get('pairlist_refresh_period', 3600)
LoggingMixin.__init__(self, logger, refresh_period) LoggingMixin.__init__(self, logger, refresh_period)
@property @property

View File

@ -18,9 +18,6 @@ from tests.conftest import (create_mock_trades, get_patched_exchange, get_patche
log_has, log_has_re) log_has, log_has_re)
logger = logging.getLogger(__name__)
@pytest.fixture(scope="function") @pytest.fixture(scope="function")
def whitelist_conf(default_conf): def whitelist_conf(default_conf):
default_conf['stake_currency'] = 'BTC' default_conf['stake_currency'] = 'BTC'
@ -222,6 +219,7 @@ def test_invalid_blacklist(mocker, markets, static_pl_conf, caplog):
def test_remove_logs_for_pairs_already_in_blacklist(mocker, markets, static_pl_conf, caplog): def test_remove_logs_for_pairs_already_in_blacklist(mocker, markets, static_pl_conf, caplog):
logger = logging.getLogger(__name__)
freqtrade = get_patched_freqtradebot(mocker, static_pl_conf) freqtrade = get_patched_freqtradebot(mocker, static_pl_conf)
mocker.patch.multiple( mocker.patch.multiple(
'freqtrade.exchange.Exchange', 'freqtrade.exchange.Exchange',
@ -230,6 +228,9 @@ def test_remove_logs_for_pairs_already_in_blacklist(mocker, markets, static_pl_c
) )
freqtrade.pairlists.refresh_pairlist() freqtrade.pairlists.refresh_pairlist()
whitelist = ['ETH/BTC', 'TKN/BTC'] whitelist = ['ETH/BTC', 'TKN/BTC']
caplog.clear()
caplog.set_level(logging.INFO)
# Ensure all except those in whitelist are removed. # Ensure all except those in whitelist are removed.
assert set(whitelist) == set(freqtrade.pairlists.whitelist) assert set(whitelist) == set(freqtrade.pairlists.whitelist)
assert static_pl_conf['exchange']['pair_blacklist'] == freqtrade.pairlists.blacklist assert static_pl_conf['exchange']['pair_blacklist'] == freqtrade.pairlists.blacklist