summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/__init__.py0
-rw-r--r--cli/tests/test_cli_data.py17
-rw-r--r--cli/tests/test_cli_trade.py10
3 files changed, 27 insertions, 0 deletions
diff --git a/cli/tests/__init__.py b/cli/tests/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/cli/tests/__init__.py
diff --git a/cli/tests/test_cli_data.py b/cli/tests/test_cli_data.py
new file mode 100644
index 0000000..2cc2149
--- /dev/null
+++ b/cli/tests/test_cli_data.py
@@ -0,0 +1,17 @@
+from click.testing import CliRunner
+from trading_cli.main import cli
+
+
+def test_cli_help():
+ runner = CliRunner()
+ result = runner.invoke(cli, ["--help"])
+ assert result.exit_code == 0
+ assert "Usage" in result.output
+
+
+def test_cli_data_group():
+ runner = CliRunner()
+ result = runner.invoke(cli, ["data", "--help"])
+ assert result.exit_code == 0
+ assert "collect" in result.output
+ assert "history" in result.output
diff --git a/cli/tests/test_cli_trade.py b/cli/tests/test_cli_trade.py
new file mode 100644
index 0000000..d3f3079
--- /dev/null
+++ b/cli/tests/test_cli_trade.py
@@ -0,0 +1,10 @@
+from click.testing import CliRunner
+from trading_cli.main import cli
+
+
+def test_cli_trade_group():
+ runner = CliRunner()
+ result = runner.invoke(cli, ["trade", "--help"])
+ assert result.exit_code == 0
+ assert "start" in result.output
+ assert "stop" in result.output