Update tests

This commit is contained in:
Matthias 2022-10-07 20:45:50 +02:00
parent ed12cddf3f
commit 1aedf08ba5

View File

@ -3,7 +3,6 @@
from datetime import datetime, timedelta from datetime import datetime, timedelta
from unittest.mock import MagicMock from unittest.mock import MagicMock
import pytest
from requests import RequestException from requests import RequestException
from freqtrade.enums import ExitType, RPCMessageType from freqtrade.enums import ExitType, RPCMessageType
@ -356,15 +355,6 @@ def test_exception_send_msg(default_conf, mocker, caplog):
assert log_has("Problem calling Webhook. Please check your webhook configuration. " assert log_has("Problem calling Webhook. Please check your webhook configuration. "
"Exception: 'DEADBEEF'", caplog) "Exception: 'DEADBEEF'", caplog)
msg_mock = MagicMock()
mocker.patch("freqtrade.rpc.webhook.Webhook._send_msg", msg_mock)
msg = {
'type': 'DEADBEEF',
'status': 'whatever'
}
with pytest.raises(NotImplementedError):
webhook.send_msg(msg)
# Test no failure for not implemented but known messagetypes # Test no failure for not implemented but known messagetypes
for e in RPCMessageType: for e in RPCMessageType:
msg = { msg = {