Add test for start_websever
This commit is contained in:
@@ -16,6 +16,7 @@ from freqtrade.commands import (start_convert_data, start_create_userdir, start_
|
||||
start_test_pairlist, start_trading)
|
||||
from freqtrade.commands.deploy_commands import (clean_ui_subdir, download_and_install_ui,
|
||||
get_ui_download_url, read_ui_version)
|
||||
from freqtrade.commands.trade_commands import start_webserver
|
||||
from freqtrade.configuration import setup_utils_configuration
|
||||
from freqtrade.enums import RunMode
|
||||
from freqtrade.exceptions import OperationalException
|
||||
@@ -58,6 +59,18 @@ def test_start_trading_fail(mocker, caplog):
|
||||
assert log_has('Fatal exception!', caplog)
|
||||
|
||||
|
||||
def test_start_webserver(mocker, caplog):
|
||||
|
||||
api_server_mock = mocker.patch("freqtrade.rpc.api_server.ApiServer", )
|
||||
|
||||
args = [
|
||||
'webserver',
|
||||
'-c', 'config_bittrex.json.example'
|
||||
]
|
||||
start_webserver(get_args(args))
|
||||
assert api_server_mock.call_count == 1
|
||||
|
||||
|
||||
def test_list_exchanges(capsys):
|
||||
|
||||
args = [
|
||||
|
Reference in New Issue
Block a user