File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change 1
1
import pytest
2
2
from pydantic import AnyUrl
3
3
4
- from agents import Agent , Runner
5
-
6
4
from .helpers import FakeMCPServer
7
5
8
6
@@ -45,27 +43,3 @@ async def test_read_resource_not_found():
45
43
uri = "docs://api/reference"
46
44
with pytest .raises (KeyError , match = f"Resource { uri } not found" ):
47
45
await server .read_resource (AnyUrl (uri ))
48
-
49
- @pytest .mark .asyncio
50
- @pytest .mark .parametrize ("streaming" , [False , True ])
51
- async def test_agent_with_resources (streaming : bool ):
52
- """Test agent with resources"""
53
- server = FakeMCPServer ()
54
-
55
- agent = Agent (
56
- name = "Assistant" ,
57
- instructions = "Answer users queries using the available resources" ,
58
- mcp_servers = [server ],
59
- )
60
-
61
- message = "What's the process to access the APIs?"
62
- if streaming :
63
- streaming_result = Runner .run_streamed (agent , input = message )
64
- async for _ in streaming_result .stream_events ():
65
- pass
66
- final_result = streaming_result .final_output
67
- else :
68
- result = await Runner .run (agent , input = message )
69
- final_result = result .final_output
70
-
71
- assert final_result is not None
You can’t perform that action at this time.
0 commit comments