Fix broken telegram tests
This commit is contained in:
parent
2312b86a66
commit
61acbf21d0
@ -1461,21 +1461,21 @@ def test_whitelist_static(default_conf, update, mocker) -> None:
|
|||||||
context = MagicMock()
|
context = MagicMock()
|
||||||
context.args = ['sorted']
|
context.args = ['sorted']
|
||||||
msg_mock.reset_mock()
|
msg_mock.reset_mock()
|
||||||
telegram._whitelist(update=update, context=MagicMock())
|
telegram._whitelist(update=update, context=context)
|
||||||
assert ("Using whitelist `['StaticPairList']` with 4 pairs\n"
|
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]))
|
"`ETH/BTC, LTC/BTC, NEO/BTC, XRP/BTC`" in msg_mock.call_args_list[0][0][0])
|
||||||
|
|
||||||
context = MagicMock()
|
context = MagicMock()
|
||||||
context.args = ['baseonly']
|
context.args = ['baseonly']
|
||||||
msg_mock.reset_mock()
|
msg_mock.reset_mock()
|
||||||
telegram._whitelist(update=update, context=MagicMock())
|
telegram._whitelist(update=update, context=context)
|
||||||
assert ("Using whitelist `['StaticPairList']` with 4 pairs\n"
|
assert ("Using whitelist `['StaticPairList']` with 4 pairs\n"
|
||||||
"`ETH, LTC, XRP, NEO`" in msg_mock.call_args_list[0][0][0])
|
"`ETH, LTC, XRP, NEO`" in msg_mock.call_args_list[0][0][0])
|
||||||
|
|
||||||
context = MagicMock()
|
context = MagicMock()
|
||||||
context.args = ['baseonly', 'sorted']
|
context.args = ['baseonly', 'sorted']
|
||||||
msg_mock.reset_mock()
|
msg_mock.reset_mock()
|
||||||
telegram._whitelist(update=update, context=MagicMock())
|
telegram._whitelist(update=update, context=context)
|
||||||
assert ("Using whitelist `['StaticPairList']` with 4 pairs\n"
|
assert ("Using whitelist `['StaticPairList']` with 4 pairs\n"
|
||||||
"`ETH, LTC, NEO, XRP`" in msg_mock.call_args_list[0][0][0])
|
"`ETH, LTC, NEO, XRP`" in msg_mock.call_args_list[0][0][0])
|
||||||
|
|
||||||
@ -1495,22 +1495,22 @@ def test_whitelist_dynamic(default_conf, update, mocker) -> None:
|
|||||||
context = MagicMock()
|
context = MagicMock()
|
||||||
context.args = ['sorted']
|
context.args = ['sorted']
|
||||||
msg_mock.reset_mock()
|
msg_mock.reset_mock()
|
||||||
telegram._whitelist(update=update, context=MagicMock())
|
telegram._whitelist(update=update, context=context)
|
||||||
assert ("Using whitelist `['StaticPairList']` with 4 pairs\n"
|
assert ("Using whitelist `['VolumePairList']` with 4 pairs\n"
|
||||||
"`ETH/BTC, LTC/BTC, NEO/BTC, XRP/BTC`" in sorted(msg_mock.call_args_list[0][0][0]))
|
"`ETH/BTC, LTC/BTC, NEO/BTC, XRP/BTC`" in msg_mock.call_args_list[0][0][0])
|
||||||
|
|
||||||
context = MagicMock()
|
context = MagicMock()
|
||||||
context.args = ['baseonly']
|
context.args = ['baseonly']
|
||||||
msg_mock.reset_mock()
|
msg_mock.reset_mock()
|
||||||
telegram._whitelist(update=update, context=MagicMock())
|
telegram._whitelist(update=update, context=context)
|
||||||
assert ("Using whitelist `['StaticPairList']` with 4 pairs\n"
|
assert ("Using whitelist `['VolumePairList']` with 4 pairs\n"
|
||||||
"`ETH, LTC, XRP, NEO`" in msg_mock.call_args_list[0][0][0])
|
"`ETH, LTC, XRP, NEO`" in msg_mock.call_args_list[0][0][0])
|
||||||
|
|
||||||
context = MagicMock()
|
context = MagicMock()
|
||||||
context.args = ['baseonly', 'sorted']
|
context.args = ['baseonly', 'sorted']
|
||||||
msg_mock.reset_mock()
|
msg_mock.reset_mock()
|
||||||
telegram._whitelist(update=update, context=MagicMock())
|
telegram._whitelist(update=update, context=context)
|
||||||
assert ("Using whitelist `['StaticPairList']` with 4 pairs\n"
|
assert ("Using whitelist `['VolumePairList']` with 4 pairs\n"
|
||||||
"`ETH, LTC, NEO, XRP`" in msg_mock.call_args_list[0][0][0])
|
"`ETH, LTC, NEO, XRP`" in msg_mock.call_args_list[0][0][0])
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user