Merge pull request #2725 from freqtrade/minor_fix
[Minor] Edge-cli should use exchangeresolver
This commit is contained in:
commit
2537b8cb0c
@ -12,8 +12,7 @@ from freqtrade import constants
|
|||||||
from freqtrade.configuration import (TimeRange, remove_credentials,
|
from freqtrade.configuration import (TimeRange, remove_credentials,
|
||||||
validate_config_consistency)
|
validate_config_consistency)
|
||||||
from freqtrade.edge import Edge
|
from freqtrade.edge import Edge
|
||||||
from freqtrade.exchange import Exchange
|
from freqtrade.resolvers import StrategyResolver, ExchangeResolver
|
||||||
from freqtrade.resolvers import StrategyResolver
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -33,7 +32,7 @@ class EdgeCli:
|
|||||||
# Reset keys for edge
|
# Reset keys for edge
|
||||||
remove_credentials(self.config)
|
remove_credentials(self.config)
|
||||||
self.config['stake_amount'] = constants.UNLIMITED_STAKE_AMOUNT
|
self.config['stake_amount'] = constants.UNLIMITED_STAKE_AMOUNT
|
||||||
self.exchange = Exchange(self.config)
|
self.exchange = ExchangeResolver.load_exchange(self.config['exchange']['name'], self.config)
|
||||||
self.strategy = StrategyResolver.load_strategy(self.config)
|
self.strategy = StrategyResolver.load_strategy(self.config)
|
||||||
|
|
||||||
validate_config_consistency(self.config)
|
validate_config_consistency(self.config)
|
||||||
|
@ -448,6 +448,9 @@ def test_create_datadir(caplog, mocker):
|
|||||||
# Ensure that caplog is empty before starting ...
|
# Ensure that caplog is empty before starting ...
|
||||||
# Should prevent random failures.
|
# Should prevent random failures.
|
||||||
caplog.clear()
|
caplog.clear()
|
||||||
|
# Added assert here to analyze random test-failures ...
|
||||||
|
assert len(caplog.record_tuples) == 0
|
||||||
|
|
||||||
cud = mocker.patch("freqtrade.utils.create_userdata_dir", MagicMock())
|
cud = mocker.patch("freqtrade.utils.create_userdata_dir", MagicMock())
|
||||||
csf = mocker.patch("freqtrade.utils.copy_sample_files", MagicMock())
|
csf = mocker.patch("freqtrade.utils.copy_sample_files", MagicMock())
|
||||||
args = [
|
args = [
|
||||||
|
Loading…
Reference in New Issue
Block a user