Clean up the use of patch_exchange

This commit is contained in:
hroff-1902 2019-09-11 09:52:09 +03:00
parent a9ecdc7764
commit ac413c65dc
2 changed files with 3 additions and 3 deletions

View File

@ -117,7 +117,7 @@ def patch_freqtradebot(mocker, config) -> None:
"""
mocker.patch('freqtrade.freqtradebot.RPCManager', MagicMock())
persistence.init(config['db_url'])
patch_exchange(mocker, None)
patch_exchange(mocker)
mocker.patch('freqtrade.freqtradebot.RPCManager._init', MagicMock())
mocker.patch('freqtrade.freqtradebot.RPCManager.send_msg', MagicMock())

View File

@ -90,7 +90,7 @@ def test_cleanup(default_conf, mocker) -> None:
def test_authorized_only(default_conf, mocker, caplog) -> None:
patch_exchange(mocker, None)
patch_exchange(mocker)
chat = Chat(0, 0)
update = Update(randint(1, 100))
@ -108,7 +108,7 @@ def test_authorized_only(default_conf, mocker, caplog) -> None:
def test_authorized_only_unauthorized(default_conf, mocker, caplog) -> None:
patch_exchange(mocker, None)
patch_exchange(mocker)
chat = Chat(0xdeadbeef, 0)
update = Update(randint(1, 100))
update.message = Message(randint(1, 100), 0, datetime.utcnow(), chat)