From ccc0ad6f642aa875c06bc39bb34a646c07cddb10 Mon Sep 17 00:00:00 2001 From: ecoppen <51025241+ecoppen@users.noreply.github.com> Date: Fri, 12 Aug 2022 19:58:41 +0100 Subject: [PATCH] fix - reload whitelist Should fix the issue, if not I'll move development to a different computer and get local testing running properly. --- tests/rpc/test_rpc_telegram.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/rpc/test_rpc_telegram.py b/tests/rpc/test_rpc_telegram.py index 8049a10e9..cd26e744f 100644 --- a/tests/rpc/test_rpc_telegram.py +++ b/tests/rpc/test_rpc_telegram.py @@ -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)