Adapt tests
This commit is contained in:
parent
104f1212e6
commit
8ad30e2625
@ -7,7 +7,8 @@ from unittest.mock import MagicMock
|
||||
|
||||
from freqtrade.arguments import Arguments
|
||||
from freqtrade.edge import PairInfo
|
||||
from freqtrade.optimize.edge_cli import EdgeCli, setup_configuration, start
|
||||
from freqtrade.optimize import start_edgecli, setup_configuration
|
||||
from freqtrade.optimize.edge_cli import EdgeCli
|
||||
from freqtrade.state import RunMode
|
||||
from freqtrade.tests.conftest import log_has, log_has_re, patch_exchange
|
||||
|
||||
@ -27,7 +28,7 @@ def test_setup_configuration_without_arguments(mocker, default_conf, caplog) ->
|
||||
'edge'
|
||||
]
|
||||
|
||||
config = setup_configuration(get_args(args))
|
||||
config = setup_configuration(get_args(args), RunMode.EDGECLI)
|
||||
assert config['runmode'] == RunMode.EDGECLI
|
||||
|
||||
assert 'max_open_trades' in config
|
||||
@ -67,7 +68,7 @@ def test_setup_edge_configuration_with_arguments(mocker, edge_conf, caplog) -> N
|
||||
'--stoplosses=-0.01,-0.10,-0.001'
|
||||
]
|
||||
|
||||
config = setup_configuration(get_args(args))
|
||||
config = setup_configuration(get_args(args), RunMode.EDGECLI)
|
||||
assert 'max_open_trades' in config
|
||||
assert 'stake_currency' in config
|
||||
assert 'stake_amount' in config
|
||||
@ -106,7 +107,7 @@ def test_start(mocker, fee, edge_conf, caplog) -> None:
|
||||
'edge'
|
||||
]
|
||||
args = get_args(args)
|
||||
start(args)
|
||||
start_edgecli(args)
|
||||
assert log_has(
|
||||
'Starting freqtrade in Edge mode',
|
||||
caplog.record_tuples
|
||||
|
Loading…
Reference in New Issue
Block a user