Files
aitbc/tests/cli/test_cli_integration.py
oib 15427c96c0 chore: update file permissions to executable across repository
- Change file mode from 644 to 755 for all project files
- Add chain_id parameter to get_balance RPC endpoint with default "ait-devnet"
- Rename Miner.extra_meta_data to extra_metadata for consistency
2026-03-06 22:17:54 +01:00

31 lines
953 B
Python
Executable File

"""
CLI integration tests using AITBC CLI against a live (in-memory) coordinator.
Spins up the real coordinator FastAPI app with an in-memory SQLite DB,
then patches httpx.Client so every CLI command's HTTP call is routed
through the ASGI transport instead of making real network requests.
"""
import pytest
import sys
from pathlib import Path
from unittest.mock import Mock, patch
from click.testing import CliRunner
from aitbc_cli.main import cli
class TestCLIIntegration:
"""Test CLI integration with coordinator"""
def test_cli_help(self):
"""Test CLI help command"""
runner = CliRunner()
result = runner.invoke(cli, ['--help'])
assert result.exit_code == 0
assert 'aitbc' in result.output.lower()
def test_config_show(self):
"""Test config show command"""
runner = CliRunner()
result = runner.invoke(cli, ['config-show'])
assert result.exit_code == 0