41 lines
1.3 KiB
Python
41 lines
1.3 KiB
Python
|
|
"""Tests for MCP prompts (setup_wizard, satellite_tracking_guide, rf_sweep_guide)."""
|
||
|
|
|
||
|
|
import pytest
|
||
|
|
from fastmcp import Client
|
||
|
|
|
||
|
|
|
||
|
|
@pytest.mark.anyio
|
||
|
|
async def test_setup_wizard_prompt(mcp_client: Client):
|
||
|
|
result = await mcp_client.get_prompt("setup_wizard")
|
||
|
|
|
||
|
|
assert result.messages, "setup_wizard returned no messages"
|
||
|
|
text = result.messages[0].content.text
|
||
|
|
assert len(text) > 0
|
||
|
|
assert "connect" in text.lower()
|
||
|
|
assert "home_motor" in text
|
||
|
|
assert "get_position" in text
|
||
|
|
|
||
|
|
|
||
|
|
@pytest.mark.anyio
|
||
|
|
async def test_satellite_tracking_guide_prompt(mcp_client: Client):
|
||
|
|
result = await mcp_client.get_prompt("satellite_tracking_guide")
|
||
|
|
|
||
|
|
assert result.messages, "satellite_tracking_guide returned no messages"
|
||
|
|
text = result.messages[0].content.text
|
||
|
|
assert len(text) > 0
|
||
|
|
assert "search_satellites" in text
|
||
|
|
assert "get_passes" in text
|
||
|
|
assert "move_to" in text
|
||
|
|
|
||
|
|
|
||
|
|
@pytest.mark.anyio
|
||
|
|
async def test_rf_sweep_guide_prompt(mcp_client: Client):
|
||
|
|
result = await mcp_client.get_prompt("rf_sweep_guide")
|
||
|
|
|
||
|
|
assert result.messages, "rf_sweep_guide returned no messages"
|
||
|
|
text = result.messages[0].content.text
|
||
|
|
assert len(text) > 0
|
||
|
|
assert "enable_lna" in text
|
||
|
|
assert "get_rssi" in text
|
||
|
|
assert "az_sweep" in text
|