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)