From 6b7935f1ae0e0c028d66017df6a3356c43c54745 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 19 Mar 2024 20:23:51 +0100 Subject: [PATCH] Add initial test ... --- tests/commands/test_commands.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/commands/test_commands.py b/tests/commands/test_commands.py index d20d37c0e..8e59ea2c2 100644 --- a/tests/commands/test_commands.py +++ b/tests/commands/test_commands.py @@ -12,9 +12,9 @@ from freqtrade.commands import (start_backtesting_show, start_convert_data, star start_create_userdir, start_download_data, start_hyperopt_list, start_hyperopt_show, start_install_ui, start_list_data, start_list_exchanges, start_list_markets, start_list_strategies, - start_list_timeframes, start_new_strategy, start_show_trades, - start_strategy_update, start_test_pairlist, start_trading, - start_webserver) + start_list_timeframes, start_new_strategy, start_show_config, + start_show_trades, start_strategy_update, start_test_pairlist, + start_trading, start_webserver) from freqtrade.commands.db_commands import start_convert_db from freqtrade.commands.deploy_commands import (clean_ui_subdir, download_and_install_ui, get_ui_download_url, read_ui_version) @@ -1579,3 +1579,18 @@ def test_start_strategy_updater(mocker, tmp_path): start_strategy_update(pargs) # Number of strategies in the test directory assert sc_mock.call_count == 2 + + +def test_start_show_config(capsys): + args = [ + "show-config", + "--config", + "tests/testdata/testconfigs/main_test_config.json", + ] + pargs = get_args(args) + start_show_config(pargs) + + captured = capsys.readouterr() + assert "Your combined configuration is:" in captured.out + assert '"max_open_trades":' in captured.out + assert '"secret": "REDACTED"' in captured.out