fix - reload whitelist

Should fix the issue, if not I'll move development to a different computer and get local testing running properly.
This commit is contained in:
ecoppen 2022-08-12 19:58:41 +01:00
parent 923f73a516
commit ccc0ad6f64

View File

@ -1461,21 +1461,25 @@ def test_whitelist_static(default_conf, update, mocker) -> None:
context = MagicMock()
context.args = ['sorted']
msg_mock.reset_mock()
telegram._whitelist(update=update, context=MagicMock())
assert ("Using whitelist `['StaticPairList']` with 4 pairs\n"
"`ETH/BTC, LTC/BTC, NEO/BTC, XRP/BTC`" in sorted(msg_mock.call_args_list[0][0][0]))
context = MagicMock()
context.args = ['nobase']
context.args = ['baseonly']
msg_mock.reset_mock()
telegram._whitelist(update=update, context=MagicMock())
assert ("Using whitelist `['StaticPairList']` with 4 pairs\n"
"`ETH, LTC, XRP, NEO`" in msg_mock.call_args_list[0][0][0])
context = MagicMock()
context.args = ['nobase', 'sorted']
context.args = ['baseonly', 'sorted']
msg_mock.reset_mock()
telegram._whitelist(update=update, context=MagicMock())
assert ("Using whitelist `['StaticPairList']` with 4 pairs\n"
"`ETH, LTC, NEO, XRP`" in msg_mock.call_args_list[0][0][0])
def test_whitelist_dynamic(default_conf, update, mocker) -> None:
mocker.patch('freqtrade.exchange.Exchange.exchange_has', MagicMock(return_value=True))
default_conf['pairlists'] = [{'method': 'VolumePairList',
@ -1491,21 +1495,25 @@ def test_whitelist_dynamic(default_conf, update, mocker) -> None:
context = MagicMock()
context.args = ['sorted']
msg_mock.reset_mock()
telegram._whitelist(update=update, context=MagicMock())
assert ("Using whitelist `['StaticPairList']` with 4 pairs\n"
"`ETH/BTC, LTC/BTC, NEO/BTC, XRP/BTC`" in sorted(msg_mock.call_args_list[0][0][0]))
context = MagicMock()
context.args = ['nobase']
context.args = ['baseonly']
msg_mock.reset_mock()
telegram._whitelist(update=update, context=MagicMock())
assert ("Using whitelist `['StaticPairList']` with 4 pairs\n"
"`ETH, LTC, XRP, NEO`" in msg_mock.call_args_list[0][0][0])
context = MagicMock()
context.args = ['nobase', 'sorted']
context.args = ['baseonly', 'sorted']
msg_mock.reset_mock()
telegram._whitelist(update=update, context=MagicMock())
assert ("Using whitelist `['StaticPairList']` with 4 pairs\n"
"`ETH, LTC, NEO, XRP`" in msg_mock.call_args_list[0][0][0])
def test_blacklist_static(default_conf, update, mocker) -> None:
telegram, freqtradebot, msg_mock = get_telegram_testobject(mocker, default_conf)