Deep-copy default_conf for edge config
This commit is contained in:
		| @@ -2,6 +2,7 @@ | |||||||
| import json | import json | ||||||
| import logging | import logging | ||||||
| import re | import re | ||||||
|  | from copy import deepcopy | ||||||
| from datetime import datetime | from datetime import datetime | ||||||
| from functools import reduce | from functools import reduce | ||||||
| from unittest.mock import MagicMock, PropertyMock | from unittest.mock import MagicMock, PropertyMock | ||||||
| @@ -942,9 +943,10 @@ def buy_order_fee(): | |||||||
|  |  | ||||||
| @pytest.fixture(scope="function") | @pytest.fixture(scope="function") | ||||||
| def edge_conf(default_conf): | def edge_conf(default_conf): | ||||||
|     default_conf['max_open_trades'] = -1 |     conf = deepcopy(default_conf) | ||||||
|     default_conf['stake_amount'] = constants.UNLIMITED_STAKE_AMOUNT |     conf['max_open_trades'] = -1 | ||||||
|     default_conf['edge'] = { |     conf['stake_amount'] = constants.UNLIMITED_STAKE_AMOUNT | ||||||
|  |     conf['edge'] = { | ||||||
|         "enabled": True, |         "enabled": True, | ||||||
|         "process_throttle_secs": 1800, |         "process_throttle_secs": 1800, | ||||||
|         "calculate_since_number_of_days": 14, |         "calculate_since_number_of_days": 14, | ||||||
| @@ -960,4 +962,4 @@ def edge_conf(default_conf): | |||||||
|         "remove_pumps": False |         "remove_pumps": False | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     return default_conf |     return conf | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user