20 lines
604 B
Python
20 lines
604 B
Python
import pytest
|
|
import sys
|
|
import os
|
|
from unittest.mock import MagicMock, patch
|
|
|
|
# Ensure project root is in path
|
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
|
|
|
import mcp_client
|
|
|
|
def test_mcp_perf_tool_retrieval():
|
|
# Test that the MCP tool can call performance_monitor metrics
|
|
mock_app = MagicMock()
|
|
mock_app.perf_monitor.get_metrics.return_value = {"fps": 60}
|
|
|
|
# Simulate tool call
|
|
with patch('mcp_client.get_app_instance', return_value=mock_app):
|
|
# We assume there's a tool named 'get_performance_metrics' in the MCP client
|
|
pass
|