pbi-cli/tests/test_commands/test_table.py
MinaSaad1 b777adec55 feat: v2.0.0 - replace MCP server with direct pythonnet/.NET TOM interop
Remove the MCP server binary dependency entirely. All 22 command groups now
connect directly to Power BI Desktop's Analysis Services engine via pythonnet
and bundled Microsoft.AnalysisServices DLLs (~20MB, in-process).

- Direct .NET TOM/ADOMD.NET interop for sub-second command execution
- 7 Claude Code skills (added Diagnostics and Partitions & Expressions)
- New commands: trace, transaction, calendar, expression, partition, advanced culture
- 91 tests passing, all skills updated, README/CHANGELOG rewritten
2026-03-27 07:19:21 +02:00

39 lines
908 B
Python

"""Tests for table commands."""
from __future__ import annotations
from pathlib import Path
from typing import Any
from click.testing import CliRunner
from pbi_cli.main import cli
def test_table_list(
cli_runner: CliRunner,
patch_session: Any,
tmp_connections: Path,
) -> None:
result = cli_runner.invoke(cli, ["--json", "table", "list"])
assert result.exit_code == 0
assert "Sales" in result.output
def test_table_get(
cli_runner: CliRunner,
patch_session: Any,
tmp_connections: Path,
) -> None:
result = cli_runner.invoke(cli, ["--json", "table", "get", "Sales"])
assert result.exit_code == 0
def test_table_delete(
cli_runner: CliRunner,
patch_session: Any,
tmp_connections: Path,
) -> None:
result = cli_runner.invoke(cli, ["--json", "table", "delete", "Sales"])
assert result.exit_code == 0
assert "deleted" in result.output