diff --git a/lib/crewai/tests/mcp/test_agent_mcp_error_handling.py b/lib/crewai/tests/mcp/test_agent_mcp_error_handling.py index 04b973d00..18b5fca0e 100644 --- a/lib/crewai/tests/mcp/test_agent_mcp_error_handling.py +++ b/lib/crewai/tests/mcp/test_agent_mcp_error_handling.py @@ -8,6 +8,11 @@ from crewai.agent.core import Agent from crewai.mcp import MCPServerSSE +@pytest.fixture(autouse=True) +def isolate_storage(tmp_path, monkeypatch): + monkeypatch.setenv("CREWAI_STORAGE_DIR", str(tmp_path / "storage")) + + class FakeSSEClientError: def __init__(self, url, headers=None): self.url = url diff --git a/lib/crewai/tests/mcp/transports/test_sse_transport.py b/lib/crewai/tests/mcp/transports/test_sse_transport.py index 57f373795..92bc855fa 100644 --- a/lib/crewai/tests/mcp/transports/test_sse_transport.py +++ b/lib/crewai/tests/mcp/transports/test_sse_transport.py @@ -7,6 +7,11 @@ import pytest from crewai.mcp.transports.sse import SSETransport +@pytest.fixture(autouse=True) +def isolate_storage(tmp_path, monkeypatch): + monkeypatch.setenv("CREWAI_STORAGE_DIR", str(tmp_path / "storage")) + + class FakeSSEClient: def __init__(self, url, headers=None): self.url = url