improve more tests by freezing time

This commit is contained in:
Matthias 2022-12-08 14:33:07 +01:00
parent da4914513a
commit 1da8ad69d9

View File

@ -1907,6 +1907,7 @@ def test_send_msg_entry_fill_notification(default_conf, mocker, message_type, en
def test_send_msg_sell_notification(default_conf, mocker) -> None:
with time_machine.travel("2022-09-01 05:00:00 +00:00", tick=False):
telegram, _, msg_mock = get_telegram_testobject(mocker, default_conf)
old_convamount = telegram._rpc._fiat_converter.convert_amount
@ -2066,7 +2067,7 @@ def test_send_msg_sell_fill_notification(default_conf, mocker, direction,
default_conf['telegram']['notification_settings']['exit_fill'] = 'on'
telegram, _, msg_mock = get_telegram_testobject(mocker, default_conf)
with time_machine.travel("2022-09-01 05:00:00 +00:00", tick=False) as t:
with time_machine.travel("2022-09-01 05:00:00 +00:00", tick=False):
telegram.send_msg({
'type': RPCMessageType.EXIT_FILL,
'trade_id': 1,