Test for blacklist

This commit is contained in:
Matthias 2018-11-30 07:06:02 +01:00
parent 8fd713f3ae
commit 58c7adae0a
2 changed files with 4 additions and 3 deletions

View File

@ -30,7 +30,7 @@ class StaticList(object):
def refresh_whitelist(self) -> None:
"""
Refreshes whitelist.
Refreshes whitelist and assigns it to self._whitelist
"""
self._whitelist = self.validate_whitelist(self._config['exchange']['pair_whitelist'])

View File

@ -6,7 +6,7 @@ from freqtrade.tests.conftest import get_patched_freqtradebot
import pytest
# whitelist, blacklist,
# whitelist, blacklist
@pytest.fixture(scope="function")
@ -41,7 +41,7 @@ def test_refresh_market_pair_not_in_whitelist(mocker, markets, whitelist_conf):
freqtradebot.config['exchange']['pair_whitelist'])
def test_refresh_whitelist(mocker, markets, whitelist_conf):
def test_refresh_pairlists(mocker, markets, whitelist_conf):
freqtradebot = get_patched_freqtradebot(mocker, whitelist_conf)
mocker.patch('freqtrade.exchange.Exchange.get_markets', markets)
@ -50,6 +50,7 @@ def test_refresh_whitelist(mocker, markets, whitelist_conf):
whitelist = ['ETH/BTC', 'TKN/BTC']
# Ensure all except those in whitelist are removed
assert whitelist == freqtradebot.pairlists.whitelist
assert whitelist_conf['exchange']['pair_blacklist'] == freqtradebot.pairlists.blacklist
def test_refresh_whitelist_dynamic(mocker, markets, tickers, whitelist_conf):