Create datadir when not exists

This commit is contained in:
Matthias
2019-01-01 14:07:40 +01:00
parent c337a931c2
commit a54d8f0e16
4 changed files with 27 additions and 11 deletions

View File

@@ -202,10 +202,11 @@ def test_setup_configuration_without_arguments(mocker, default_conf, caplog) ->
assert 'export' not in config
def test_setup_configuration_with_arguments(mocker, default_conf, caplog) -> None:
def test_setup_bt_configuration_with_arguments(mocker, default_conf, caplog) -> None:
mocker.patch('freqtrade.configuration.open', mocker.mock_open(
read_data=json.dumps(default_conf)
))
mocker.patch('freqtrade.configuration.Configuration._create_datadir', lambda s, c, x: x)
args = [
'--config', 'config.json',

View File

@@ -46,10 +46,11 @@ def test_setup_configuration_without_arguments(mocker, default_conf, caplog) ->
assert 'stoploss_range' not in config
def test_setup_configuration_with_arguments(mocker, edge_conf, caplog) -> None:
def test_setup_edge_configuration_with_arguments(mocker, edge_conf, caplog) -> None:
mocker.patch('freqtrade.configuration.open', mocker.mock_open(
read_data=json.dumps(edge_conf)
))
mocker.patch('freqtrade.configuration.Configuration._create_datadir', lambda s, c, x: x)
args = [
'--config', 'config.json',