mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Mock create_datadir to make sure no folders are left behind
This commit is contained in:
parent
f0cf8d6a81
commit
15a4df4c49
|
@ -143,12 +143,10 @@ def test_from_config(default_conf, mocker, caplog) -> None:
|
|||
conf2['exchange']['pair_whitelist'] += ['NANO/BTC']
|
||||
conf2['fiat_display_currency'] = "EUR"
|
||||
config_files = [conf1, conf2]
|
||||
mocker.patch('freqtrade.configuration.configuration.create_datadir', lambda c, x: x)
|
||||
|
||||
configsmock = MagicMock(side_effect=config_files)
|
||||
mocker.patch(
|
||||
'freqtrade.configuration.configuration.load_config_file',
|
||||
configsmock
|
||||
)
|
||||
mocker.patch('freqtrade.configuration.configuration.load_config_file',configsmock)
|
||||
|
||||
validated_conf = Configuration.from_files(['test_conf.json', 'test2_conf.json'])
|
||||
|
||||
|
@ -171,10 +169,8 @@ def test_print_config(default_conf, mocker, caplog) -> None:
|
|||
config_files = [conf1]
|
||||
|
||||
configsmock = MagicMock(side_effect=config_files)
|
||||
mocker.patch(
|
||||
'freqtrade.configuration.configuration.load_config_file',
|
||||
configsmock
|
||||
)
|
||||
mocker.patch('freqtrade.configuration.configuration.create_datadir', lambda c, x: x)
|
||||
mocker.patch('freqtrade.configuration.configuration.load_config_file', configsmock)
|
||||
|
||||
validated_conf = Configuration.from_files(['test_conf.json'])
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user