33
44import pytest
55
6- from agentic_security .mcp import ClientSession
76
8- from .. agentic_security .mcp .client import run
7+ from agentic_security .mcp .client import run , ClientSession
98
109
1110# Fixtures
@@ -44,7 +43,7 @@ async def mock_session():
4443
4544
4645@pytest .mark .asyncio
47- async def test_initialization (mock_session ):
46+ async def test_mcp_initialization (mock_session ):
4847 """Test initialization success and failure cases"""
4948 # Test initialization success case
5049 await run ()
@@ -60,23 +59,23 @@ async def test_initialization(mock_session):
6059
6160
6261@pytest .mark .asyncio
63- async def test_list_resources (mock_session ):
62+ async def test_mcp_list_resources (mock_session ):
6463 """Test listing available resources"""
6564 await run ()
6665 mock_session .list_resources .assert_called_once ()
67- assert await mock_session .list_resources () == ["test_resource " ]
66+ assert await mock_session .list_resources () == ["test_mcp_resource " ]
6867
6968
7069@pytest .mark .asyncio
71- async def test_list_tools (mock_session ):
70+ async def test_mcp_list_tools (mock_session ):
7271 """Test listing available tools"""
7372 await run ()
7473 mock_session .list_tools .assert_called_once ()
7574 assert await mock_session .list_tools () == ["echo_tool" ]
7675
7776
7877@pytest .mark .asyncio
79- async def test_echo_tool (mock_session ):
78+ async def test_mcp_echo_tool (mock_session ):
8079 """Test the echo tool functionality"""
8180 await run ()
8281 mock_session .call_tool .assert_called_once_with (
0 commit comments