Merge pull request #923 from freqtrade/fix_test_hyperopt

fix hyperopt test when no config.json exists
This commit is contained in:
Janne Sinivirta
2018-06-17 16:07:57 +03:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -61,6 +61,10 @@ def test_start(mocker, default_conf, caplog) -> None:
Test start() function
"""
start_mock = MagicMock()
mocker.patch(
'freqtrade.configuration.Configuration._load_config_file',
lambda *args, **kwargs: default_conf
)
mocker.patch('freqtrade.optimize.hyperopt.Hyperopt.start', start_mock)
mocker.patch('freqtrade.freqtradebot.exchange.validate_pairs', MagicMock())