improve formatting, add tests

This commit is contained in:
Matthias
2021-09-20 19:49:18 +02:00
parent dd0db7ee5d
commit fd23ab3d64
3 changed files with 27 additions and 5 deletions

View File

@@ -1324,7 +1324,7 @@ def test_send_msg_protection_notification(default_conf, mocker, time_machine) ->
msg.update(lock.to_json())
telegram.send_msg(msg)
assert (msg_mock.call_args[0][0] == "*Protection* triggered due to randreason. "
"ETH/BTC will be locked until 2021-09-01 05:10:00.")
"`ETH/BTC` will be locked until `2021-09-01 05:10:00`.")
msg_mock.reset_mock()
# Test global protection
@@ -1336,8 +1336,7 @@ def test_send_msg_protection_notification(default_conf, mocker, time_machine) ->
msg.update(lock.to_json())
telegram.send_msg(msg)
assert (msg_mock.call_args[0][0] == "*Protection* triggered due to randreason. "
"All pairs will be locked until 2021-09-01 06:45:00.")
"*All pairs* will be locked until `2021-09-01 06:45:00`.")
def test_send_msg_buy_fill_notification(default_conf, mocker) -> None: