mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 18:23:55 +00:00
Add get_timeframe mock for hyperopt
This commit is contained in:
parent
96efd12a31
commit
6729dfa6d3
|
@ -1,4 +1,5 @@
|
|||
# pragma pylint: disable=missing-docstring,W0212,C0103
|
||||
from datetime import datetime
|
||||
import os
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
|
@ -291,6 +292,10 @@ def test_generate_optimizer(mocker, default_conf) -> None:
|
|||
'freqtrade.optimize.hyperopt.Hyperopt.backtest',
|
||||
MagicMock(return_value=backtest_result)
|
||||
)
|
||||
mocker.patch(
|
||||
'freqtrade.optimize.backtesting.Backtesting.get_timeframe',
|
||||
MagicMock(return_value=(datetime(2017, 12, 10), datetime(2017, 12, 13)))
|
||||
)
|
||||
patch_exchange(mocker)
|
||||
mocker.patch('freqtrade.optimize.hyperopt.load', MagicMock())
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user