All checks were successful
CI / test (push) Successful in 13s
- Simplified CI workflow to run only unit tests (42 tests pass) - Added conftest.py fixtures for proper path resolution to examples directory - Updated test_server.py and test_cli.py to use sample_spec_path fixture
19 lines
501 B
Python
19 lines
501 B
Python
import pytest
|
|
from click.testing import CliRunner
|
|
from mockapi.cli.main import cli
|
|
|
|
|
|
def test_cli_validate_command(sample_spec_path):
|
|
"""Test the validate CLI command."""
|
|
runner = CliRunner()
|
|
result = runner.invoke(cli, ['validate', str(sample_spec_path)])
|
|
assert result.exit_code == 0
|
|
|
|
|
|
def test_cli_help():
|
|
"""Test that CLI help works."""
|
|
runner = CliRunner()
|
|
result = runner.invoke(cli, ['--help'])
|
|
assert result.exit_code == 0
|
|
assert 'MockAPI' in result.output
|