Test blacklist-adding
This commit is contained in:
parent
f0d3901b6b
commit
042354d00f
@ -1086,11 +1086,19 @@ def test_blacklist_static(default_conf, update, mocker) -> None:
|
|||||||
|
|
||||||
telegram = Telegram(freqtradebot)
|
telegram = Telegram(freqtradebot)
|
||||||
|
|
||||||
telegram._blacklist(bot=MagicMock(), update=update)
|
telegram._blacklist(bot=MagicMock(), update=update, args=[])
|
||||||
assert msg_mock.call_count == 1
|
assert msg_mock.call_count == 1
|
||||||
assert ('Using blacklist `StaticPairList` with 2 pairs\n`DOGE/BTC, HOT/BTC`'
|
assert ("Blacklist contains 2 pairs\n`DOGE/BTC, HOT/BTC`"
|
||||||
in msg_mock.call_args_list[0][0][0])
|
in msg_mock.call_args_list[0][0][0])
|
||||||
|
|
||||||
|
msg_mock.reset_mock()
|
||||||
|
telegram._blacklist(bot=MagicMock(), update=update, args=["ETH/BTC"])
|
||||||
|
assert msg_mock.call_count == 1
|
||||||
|
assert ("Blacklist contains 3 pairs\n`DOGE/BTC, HOT/BTC, ETH/BTC`"
|
||||||
|
in msg_mock.call_args_list[0][0][0])
|
||||||
|
assert freqtradebot.pairlists.blacklist == ["DOGE/BTC", "HOT/BTC", "ETH/BTC"]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def test_help_handle(default_conf, update, mocker) -> None:
|
def test_help_handle(default_conf, update, mocker) -> None:
|
||||||
patch_coinmarketcap(mocker)
|
patch_coinmarketcap(mocker)
|
||||||
|
Loading…
Reference in New Issue
Block a user