Files
api-snapshot-cli/tests/test_cli.py
7000pctAUTO 30c949ed97
Some checks failed
CI / test (push) Has been cancelled
fix: clean up test fixtures formatting for CI
2026-02-04 14:21:54 +00:00

28 lines
693 B
Python

"""Test CLI functionality."""
import pytest
from click.testing import CliRunner
from api_snapshot.cli import main
def test_main_command():
"""Test main command help."""
runner = CliRunner()
result = runner.invoke(main, ["--help"])
assert result.exit_code == 0
assert "API Snapshot" in result.output
def test_record_command_exists():
"""Test record command exists."""
runner = CliRunner()
result = runner.invoke(main, ["record", "--help"])
assert result.exit_code == 0
def test_serve_command_exists():
"""Test serve command exists."""
runner = CliRunner()
result = runner.invoke(main, ["serve", "--help"])
assert result.exit_code == 0