demoprep / tests /test_mcp_liveboard.py
mikeboone's picture
feat: March 2026 sprint β€” new vision merge, pipeline improvements, settings refactor
5ac32c1
#!/usr/bin/env python3
"""
Quick test script for MCP liveboard creation
"""
from liveboard_creator import create_liveboard_from_model_mcp
from thoughtspot_deployer import ThoughtSpotDeployer
from dotenv import load_dotenv
import os
load_dotenv()
# Create ThoughtSpot client
ts_client = ThoughtSpotDeployer(
base_url=os.getenv('THOUGHTSPOT_URL'),
username=os.getenv('THOUGHTSPOT_USERNAME'),
password=os.getenv('THOUGHTSPOT_PASSWORD')
)
# Test with the model you specified
model_name = "GEN_02031143_YWV_mdl"
model_id = "36de83be-e284-4d76-98cf-330902ba1973"
company_data = {
'name': 'Test Company',
'website': 'test.com'
}
print(f"Testing MCP liveboard creation with model: {model_name}")
print(f"Model ID: {model_id}")
print("-" * 60)
result = create_liveboard_from_model_mcp(
ts_client=ts_client,
model_id=model_id,
model_name=model_name,
company_data=company_data,
use_case="Retail Sales",
num_visualizations=3, # Just 3 to test quickly
liveboard_name="Test Liveboard MCP",
llm_model="claude-sonnet-4"
)
print("-" * 60)
print(f"Result: {result}")
if result.get('success'):
print(f"βœ… SUCCESS!")
print(f" Liveboard: {result.get('liveboard_name')}")
print(f" GUID: {result.get('liveboard_guid')}")
print(f" URL: {result.get('liveboard_url')}")
else:
print(f"❌ FAILED: {result.get('error')}")