Merge pull request #2308 from hroff-1902/hyperopt-config

Allow use of config in custom hyperopt methods
This commit is contained in:
Matthias
2019-09-28 10:36:46 +02:00
committed by GitHub
3 changed files with 8 additions and 5 deletions

View File

@@ -153,7 +153,7 @@ def test_hyperoptresolver(mocker, default_conf, caplog) -> None:
delattr(hyperopts, 'populate_sell_trend')
mocker.patch(
'freqtrade.resolvers.hyperopt_resolver.HyperOptResolver._load_hyperopt',
MagicMock(return_value=hyperopts)
MagicMock(return_value=hyperopts(default_conf))
)
x = HyperOptResolver(default_conf, ).hyperopt
assert not hasattr(x, 'populate_buy_trend')