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 '
|
'`processing_mode` not configured correctly. Supported Modes '
|
||||||
'are "filter","append"')
|
'are "filter","append"')
|
||||||
|
|
||||||
pairlists = self._config['pairlists']
|
if self._pairlist_pos == 0 and self._mode == 'blacklist':
|
||||||
|
|
||||||
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':
|
|
||||||
raise OperationalException(
|
raise OperationalException(
|
||||||
'At `blacklist` mode RemotePairList can not be on the first '
|
'At `blacklist` mode RemotePairList can not be on the first '
|
||||||
'position of your pairlist.')
|
'position of your pairlist.')
|
||||||
|
|||||||
@@ -239,7 +239,9 @@ def test_remote_pairlist_blacklist(mocker, rpl_config, caplog, markets, tickers)
|
|||||||
}
|
}
|
||||||
|
|
||||||
rpl_config['pairlists'] = [
|
rpl_config['pairlists'] = [
|
||||||
{'method': 'StaticPairList'},
|
{
|
||||||
|
"method": "StaticPairList",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"method": "RemotePairList",
|
"method": "RemotePairList",
|
||||||
"mode": "blacklist",
|
"mode": "blacklist",
|
||||||
@@ -262,7 +264,9 @@ def test_remote_pairlist_blacklist(mocker, rpl_config, caplog, markets, tickers)
|
|||||||
pairlistmanager = PairListManager(exchange, rpl_config)
|
pairlistmanager = PairListManager(exchange, rpl_config)
|
||||||
|
|
||||||
remote_pairlist = RemotePairList(exchange, pairlistmanager, 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()
|
pairs, time_elapsed = remote_pairlist.fetch_pairlist()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user