File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ import pytest
2
+
3
+ from keboola_mcp_server .server import create_server
4
+
5
+
6
+ class TestServer :
7
+ @pytest .mark .asyncio
8
+ async def test_list_tools (self ):
9
+ server = create_server ()
10
+ tools = await server .list_tools ()
11
+ assert sorted (t .name for t in tools ) == [
12
+ "get_bucket_metadata" ,
13
+ "get_table_metadata" ,
14
+ "list_bucket_info" ,
15
+ "list_bucket_tables" ,
16
+ "list_component_configs" ,
17
+ "list_components" ,
18
+ "query_table" ,
19
+ ]
20
+
21
+ @pytest .mark .asyncio
22
+ async def test_tools_have_descriptions (self ):
23
+ server = create_server ()
24
+ tools = await server .list_tools ()
25
+
26
+ missing_descriptions : list [str ] = []
27
+ for t in tools :
28
+ if not t .description :
29
+ missing_descriptions .append (t .name )
30
+
31
+ missing_descriptions .sort ()
32
+ assert not missing_descriptions , f"These tools have no description: { missing_descriptions } "
You can’t perform that action at this time.
0 commit comments