move from name to name_list
This commit is contained in:
@@ -199,7 +199,7 @@ def test_pairlist_class(mocker, whitelist_conf, markets, pairlist):
|
||||
)
|
||||
freqtrade = get_patched_freqtradebot(mocker, whitelist_conf)
|
||||
|
||||
assert freqtrade.pairlists.name == str([pairlist])
|
||||
assert freqtrade.pairlists.name_list == [pairlist]
|
||||
assert pairlist in str(freqtrade.pairlists.short_desc())
|
||||
assert isinstance(freqtrade.pairlists.whitelist, list)
|
||||
assert isinstance(freqtrade.pairlists.blacklist, list)
|
||||
|
@@ -719,21 +719,23 @@ def test_rpc_whitelist(mocker, default_conf) -> None:
|
||||
freqtradebot = get_patched_freqtradebot(mocker, default_conf)
|
||||
rpc = RPC(freqtradebot)
|
||||
ret = rpc._rpc_whitelist()
|
||||
assert ret['method'] == 'StaticPairList'
|
||||
assert len(ret['method']) == 1
|
||||
assert 'StaticPairList' in ret['method']
|
||||
assert ret['whitelist'] == default_conf['exchange']['pair_whitelist']
|
||||
|
||||
|
||||
def test_rpc_whitelist_dynamic(mocker, default_conf) -> None:
|
||||
default_conf['pairlist'] = {'method': 'VolumePairList',
|
||||
'config': {'number_assets': 4}
|
||||
}
|
||||
default_conf['pairlists'] = [{'method': 'VolumePairList',
|
||||
'config': {'number_assets': 4}
|
||||
}]
|
||||
mocker.patch('freqtrade.exchange.Exchange.exchange_has', MagicMock(return_value=True))
|
||||
mocker.patch('freqtrade.rpc.telegram.Telegram', MagicMock())
|
||||
|
||||
freqtradebot = get_patched_freqtradebot(mocker, default_conf)
|
||||
rpc = RPC(freqtradebot)
|
||||
ret = rpc._rpc_whitelist()
|
||||
assert ret['method'] == 'VolumePairList'
|
||||
assert len(ret['method']) == 1
|
||||
assert 'VolumePairList' in ret['method']
|
||||
assert ret['length'] == 4
|
||||
assert ret['whitelist'] == default_conf['exchange']['pair_whitelist']
|
||||
|
||||
@@ -744,13 +746,14 @@ def test_rpc_blacklist(mocker, default_conf) -> None:
|
||||
freqtradebot = get_patched_freqtradebot(mocker, default_conf)
|
||||
rpc = RPC(freqtradebot)
|
||||
ret = rpc._rpc_blacklist(None)
|
||||
assert ret['method'] == 'StaticPairList'
|
||||
assert len(ret['method']) == 1
|
||||
assert 'StaticPairList' in ret['method']
|
||||
assert len(ret['blacklist']) == 2
|
||||
assert ret['blacklist'] == default_conf['exchange']['pair_blacklist']
|
||||
assert ret['blacklist'] == ['DOGE/BTC', 'HOT/BTC']
|
||||
|
||||
ret = rpc._rpc_blacklist(["ETH/BTC"])
|
||||
assert ret['method'] == 'StaticPairList'
|
||||
assert 'StaticPairList' in ret['method']
|
||||
assert len(ret['blacklist']) == 3
|
||||
assert ret['blacklist'] == default_conf['exchange']['pair_blacklist']
|
||||
assert ret['blacklist'] == ['DOGE/BTC', 'HOT/BTC', 'ETH/BTC']
|
||||
|
@@ -456,7 +456,7 @@ def test_api_blacklist(botclient, mocker):
|
||||
assert_response(rc)
|
||||
assert rc.json == {"blacklist": ["DOGE/BTC", "HOT/BTC"],
|
||||
"length": 2,
|
||||
"method": "StaticPairList"}
|
||||
"method": ["StaticPairList"]}
|
||||
|
||||
# Add ETH/BTC to blacklist
|
||||
rc = client_post(client, f"{BASE_URI}/blacklist",
|
||||
@@ -464,7 +464,7 @@ def test_api_blacklist(botclient, mocker):
|
||||
assert_response(rc)
|
||||
assert rc.json == {"blacklist": ["DOGE/BTC", "HOT/BTC", "ETH/BTC"],
|
||||
"length": 3,
|
||||
"method": "StaticPairList"}
|
||||
"method": ["StaticPairList"]}
|
||||
|
||||
|
||||
def test_api_whitelist(botclient):
|
||||
@@ -474,7 +474,7 @@ def test_api_whitelist(botclient):
|
||||
assert_response(rc)
|
||||
assert rc.json == {"whitelist": ['ETH/BTC', 'LTC/BTC', 'XRP/BTC', 'NEO/BTC'],
|
||||
"length": 4,
|
||||
"method": "StaticPairList"}
|
||||
"method": ["StaticPairList"]}
|
||||
|
||||
|
||||
def test_api_forcebuy(botclient, mocker, fee):
|
||||
|
Reference in New Issue
Block a user