From 33bf7f9f30b60db9026a8784ab96e7dfe23588db Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 14 Sep 2023 20:05:01 +0200 Subject: [PATCH] Ensure test doesn't fail based on daytime failed if it's run in the first hour of the (UTC) day --- tests/rpc/test_rpc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/rpc/test_rpc.py b/tests/rpc/test_rpc.py index 49700b7f4..0a0cc5b33 100644 --- a/tests/rpc/test_rpc.py +++ b/tests/rpc/test_rpc.py @@ -263,7 +263,11 @@ def test_rpc_status_table(default_conf, ticker, fee, mocker) -> None: assert isnan(fiat_profit_sum) -def test__rpc_timeunit_profit(default_conf_usdt, ticker, fee, markets, mocker) -> None: +def test__rpc_timeunit_profit( + default_conf_usdt, ticker, fee, markets, mocker, time_machine) -> None: + + time_machine.move_to("2023-09-05 10:00:00 +00:00", tick=False) + mocker.patch('freqtrade.rpc.telegram.Telegram', MagicMock()) mocker.patch.multiple( EXMS,