mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-20 13:28:13 +00:00
fix: Resolve lint and type-checking issues in A2A integration
- Remove unused imports (uuid, List, Part, TextPart) - Fix type-checking errors for task_id and context_id validation - Remove invalid AgentCard parameter (supported_content_types) - Update test expectations for JSON output conversion - Fix TaskInfo structure usage in cancel test - Update server function call signatures in tests All A2A tests now pass (34 passed, 2 skipped) Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -30,8 +30,10 @@ class TestA2AServer:
|
||||
start_a2a_server(mock_agent_executor)
|
||||
|
||||
mock_create_app.assert_called_once_with(
|
||||
mock_agent_executor,
|
||||
transport="starlette"
|
||||
mock_agent_executor,
|
||||
transport="starlette",
|
||||
agent_name=None,
|
||||
agent_description=None
|
||||
)
|
||||
|
||||
mock_uvicorn_run.assert_called_once_with(
|
||||
@@ -56,7 +58,9 @@ class TestA2AServer:
|
||||
|
||||
mock_create_app.assert_called_once_with(
|
||||
mock_agent_executor,
|
||||
transport="fastapi"
|
||||
transport="fastapi",
|
||||
agent_name=None,
|
||||
agent_description=None
|
||||
)
|
||||
|
||||
mock_uvicorn_run.assert_called_once_with(
|
||||
@@ -126,4 +130,4 @@ class TestA2AServer:
|
||||
def test_server_import_error_handling():
|
||||
"""Test that import errors are handled gracefully when A2A is not available."""
|
||||
with pytest.raises(ImportError, match="A2A integration requires"):
|
||||
from crewai.a2a.server import start_a2a_server
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user