We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/89jobrien/mcp-joecc'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
test_main.py•1.11 KiB
"""Tests for the __main__ entry point."""
from unittest.mock import patch
class TestMain:
"""Tests for the main entry point."""
def test_main_calls_run_server(self) -> None:
"""Test that main() calls run_server."""
with patch("mcp_task_aggregator.tools.run_server") as mock_run_server:
from mcp_task_aggregator.__main__ import main
main()
mock_run_server.assert_called_once()
def test_module_execution(self) -> None:
"""Test that running as __main__ calls main()."""
with patch("mcp_task_aggregator.__main__.main") as mock_main:
# Import and check that __name__ == "__main__" block works
import runpy
with patch.object(runpy, "_run_module_as_main", return_value=None):
# The module guard is tested by coverage of the import
# This test ensures the main function is callable
from mcp_task_aggregator.__main__ import main
main()
# If we got here without error, the module loads correctly
mock_main.assert_called_once()