Some more adjustments for new pairlist
This commit is contained in:
@@ -242,6 +242,9 @@ def default_conf(testdatadir):
|
||||
"HOT/BTC",
|
||||
]
|
||||
},
|
||||
"pairlists": [
|
||||
{"method": "StaticPairList"}
|
||||
],
|
||||
"telegram": {
|
||||
"enabled": True,
|
||||
"token": "token",
|
||||
|
@@ -1050,8 +1050,8 @@ def test_whitelist_static(default_conf, update, mocker) -> None:
|
||||
|
||||
telegram._whitelist(update=update, context=MagicMock())
|
||||
assert msg_mock.call_count == 1
|
||||
assert ('Using whitelist `StaticPairList` with 4 pairs\n`ETH/BTC, LTC/BTC, XRP/BTC, NEO/BTC`'
|
||||
in msg_mock.call_args_list[0][0][0])
|
||||
assert ("Using whitelist `['StaticPairList']` with 4 pairs\n"
|
||||
"`ETH/BTC, LTC/BTC, XRP/BTC, NEO/BTC`" in msg_mock.call_args_list[0][0][0])
|
||||
|
||||
|
||||
def test_whitelist_dynamic(default_conf, update, mocker) -> None:
|
||||
@@ -1062,17 +1062,17 @@ def test_whitelist_dynamic(default_conf, update, mocker) -> None:
|
||||
_send_msg=msg_mock
|
||||
)
|
||||
mocker.patch('freqtrade.exchange.Exchange.exchange_has', MagicMock(return_value=True))
|
||||
default_conf['pairlist'] = {'method': 'VolumePairList',
|
||||
'config': {'number_assets': 4}
|
||||
}
|
||||
default_conf['pairlists'] = [{'method': 'VolumePairList',
|
||||
'config': {'number_assets': 4}
|
||||
}]
|
||||
freqtradebot = get_patched_freqtradebot(mocker, default_conf)
|
||||
|
||||
telegram = Telegram(freqtradebot)
|
||||
|
||||
telegram._whitelist(update=update, context=MagicMock())
|
||||
assert msg_mock.call_count == 1
|
||||
assert ('Using whitelist `VolumePairList` with 4 pairs\n`ETH/BTC, LTC/BTC, XRP/BTC, NEO/BTC`'
|
||||
in msg_mock.call_args_list[0][0][0])
|
||||
assert ("Using whitelist `['VolumePairList']` with 4 pairs\n"
|
||||
"`ETH/BTC, LTC/BTC, XRP/BTC, NEO/BTC`" in msg_mock.call_args_list[0][0][0])
|
||||
|
||||
|
||||
def test_blacklist_static(default_conf, update, mocker) -> None:
|
||||
|
@@ -743,9 +743,9 @@ def test_validate_whitelist(default_conf):
|
||||
|
||||
conf = deepcopy(default_conf)
|
||||
|
||||
conf.update({"pairlist": {
|
||||
conf.update({"pairlists": [{
|
||||
"method": "VolumePairList",
|
||||
}})
|
||||
}]})
|
||||
# Dynamic whitelist should not care about pair_whitelist
|
||||
validate_config_consistency(conf)
|
||||
del conf['exchange']['pair_whitelist']
|
||||
@@ -963,14 +963,16 @@ def test_process_temporary_deprecated_settings(mocker, default_conf, setting, ca
|
||||
assert default_conf[setting[0]][setting[1]] == setting[5]
|
||||
|
||||
|
||||
def test_process_deprecated_setting_precision_filter(mocker, default_conf, caplog):
|
||||
def test_process_deprecated_setting_pairlists(mocker, default_conf, caplog):
|
||||
patched_configuration_load_config_file(mocker, default_conf)
|
||||
default_conf.update({'pairlist': {
|
||||
'method': 'VolumePairList',
|
||||
'config': {'precision_filter': True}
|
||||
}})
|
||||
|
||||
process_temporary_deprecated_settings(default_conf)
|
||||
assert log_has_re(r'DEPRECATED.*precision_filter.*', caplog)
|
||||
assert log_has_re(r'DEPRECATED.*in pairlist is deprecated and must be moved*', caplog)
|
||||
|
||||
|
||||
def test_check_conflicting_settings(mocker, default_conf, caplog):
|
||||
|
Reference in New Issue
Block a user