mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-20 14:00:38 +00:00
use pairlist_pos remove unused check, fixed Test
This commit is contained in:
@@ -63,14 +63,7 @@ class RemotePairList(IPairList):
|
||||
'`processing_mode` not configured correctly. Supported Modes '
|
||||
'are "filter","append"')
|
||||
|
||||
pairlists = self._config['pairlists']
|
||||
|
||||
if len(pairlists) == 1 and self._mode == 'blacklist':
|
||||
raise OperationalException(
|
||||
'At `blacklist` mode RemotePairList requires an additional '
|
||||
'Pairlist and cannot be used on its own.')
|
||||
|
||||
if pairlists[0]['method'] == "RemotePairList" and self._mode == 'blacklist':
|
||||
if self._pairlist_pos == 0 and self._mode == 'blacklist':
|
||||
raise OperationalException(
|
||||
'At `blacklist` mode RemotePairList can not be on the first '
|
||||
'position of your pairlist.')
|
||||
|
||||
@@ -239,7 +239,9 @@ def test_remote_pairlist_blacklist(mocker, rpl_config, caplog, markets, tickers)
|
||||
}
|
||||
|
||||
rpl_config['pairlists'] = [
|
||||
{'method': 'StaticPairList'},
|
||||
{
|
||||
"method": "StaticPairList",
|
||||
},
|
||||
{
|
||||
"method": "RemotePairList",
|
||||
"mode": "blacklist",
|
||||
@@ -262,7 +264,9 @@ def test_remote_pairlist_blacklist(mocker, rpl_config, caplog, markets, tickers)
|
||||
pairlistmanager = PairListManager(exchange, rpl_config)
|
||||
|
||||
remote_pairlist = RemotePairList(exchange, pairlistmanager, rpl_config,
|
||||
rpl_config['pairlists'][1], 0)
|
||||
rpl_config["pairlists"][1], 1)
|
||||
|
||||
print(remote_pairlist._pairlistconfig)
|
||||
|
||||
pairs, time_elapsed = remote_pairlist.fetch_pairlist()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user