Skip to content

Commit

Permalink
tests: expand tests to cover several times and timezones
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Nov 1, 2024
1 parent a8516ff commit 878adfb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/commands/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,13 @@ def test_download_data_keyboardInterrupt(mocker, markets):
assert dl_mock.call_count == 1


def test_download_data_timerange(mocker, markets):
@pytest.mark.parametrize("time", ["00:00", "00:03", "00:30", "23:56"])
@pytest.mark.parametrize(
"tzoffset",
["00:00", "+01:00", "-01:00", "+05:00", "-05:00"],
)
def test_download_data_timerange(mocker, markets, time_machine, time, tzoffset):
time_machine.move_to(f"2024-11-01 {time}:00 {tzoffset}")
dl_mock = mocker.patch(
"freqtrade.data.history.history_utils.refresh_backtest_ohlcv_data",
MagicMock(return_value=["ETH/BTC", "XRP/BTC"]),
Expand Down

0 comments on commit 878adfb

Please sign in to comment.