From fa7e1dc44787592da647bdda0a63310be0cfcc8b Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:56:16 +0900 Subject: test: add CLI command tests and API router tests --- cli/tests/test_cli_portfolio.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 cli/tests/test_cli_portfolio.py (limited to 'cli/tests/test_cli_portfolio.py') diff --git a/cli/tests/test_cli_portfolio.py b/cli/tests/test_cli_portfolio.py new file mode 100644 index 0000000..351b49f --- /dev/null +++ b/cli/tests/test_cli_portfolio.py @@ -0,0 +1,16 @@ +"""Tests for portfolio CLI commands.""" +from click.testing import CliRunner +from trading_cli.main import cli + + +def test_portfolio_show_help(): + runner = CliRunner() + result = runner.invoke(cli, ["portfolio", "show", "--help"]) + assert result.exit_code == 0 + + +def test_portfolio_history_help(): + runner = CliRunner() + result = runner.invoke(cli, ["portfolio", "history", "--help"]) + assert result.exit_code == 0 + assert "--days" in result.output -- cgit v1.2.3