29 lines
634 B
Python
29 lines
634 B
Python
import unittest
|
|
|
|
from fastmcp import FastMCP
|
|
|
|
from ipython_mcp.app import app
|
|
|
|
|
|
class MCPAppTests(unittest.IsolatedAsyncioTestCase):
|
|
async def test_exports_typed_ipython_tools_from_plain_fastmcp(self):
|
|
self.assertIsInstance(app, FastMCP)
|
|
|
|
tools = await app.list_tools()
|
|
|
|
self.assertEqual(
|
|
{tool.name for tool in tools},
|
|
{
|
|
"get_app_info",
|
|
"run_code",
|
|
"list_shells",
|
|
"get_shell",
|
|
"create_shell",
|
|
"get_last_shell",
|
|
},
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|