From 57d91439a7d0b86f43d3231841dddac2ee334674 Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Tue, 6 Jan 2026 17:44:35 -0500 Subject: [PATCH] chore: update test assumption, docs --- docs/en/learn/a2a-agent-delegation.mdx | 2 +- lib/crewai/tests/a2a/test_a2a_integration.py | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/en/learn/a2a-agent-delegation.mdx b/docs/en/learn/a2a-agent-delegation.mdx index 43f88abd2..e4c9f8228 100644 --- a/docs/en/learn/a2a-agent-delegation.mdx +++ b/docs/en/learn/a2a-agent-delegation.mdx @@ -315,7 +315,7 @@ agent = Agent( a2a=A2AConfig( endpoint="https://research.example.com/.well-known/agent-card.json", updates=PushNotificationConfig( - url="https://your-server.com/webhook", + url={base_url}/a2a/callback", token="your-validation-token", timeout=300.0 ) diff --git a/lib/crewai/tests/a2a/test_a2a_integration.py b/lib/crewai/tests/a2a/test_a2a_integration.py index 6aa890689..f46af4789 100644 --- a/lib/crewai/tests/a2a/test_a2a_integration.py +++ b/lib/crewai/tests/a2a/test_a2a_integration.py @@ -172,12 +172,12 @@ class TestA2APushNotificationHandler: ) @pytest.mark.asyncio - async def test_push_handler_registers_callback_and_waits( + async def test_push_handler_waits_for_result( self, mock_agent_card: AgentCard, mock_task, ) -> None: - """Test that push handler registers callback and waits for result.""" + """Test that push handler waits for result from store.""" from unittest.mock import AsyncMock, MagicMock from a2a.types import Task, TaskStatus @@ -201,7 +201,6 @@ class TestA2APushNotificationHandler: mock_client = MagicMock() mock_client.send_message = mock_send_message - mock_client.set_task_callback = AsyncMock() config = PushNotificationConfig( url=AnyHttpUrl("http://localhost:8080/a2a/callback"), @@ -228,7 +227,6 @@ class TestA2APushNotificationHandler: polling_interval=1.0, ) - mock_client.set_task_callback.assert_called_once() mock_store.wait_for_result.assert_called_once_with( task_id="task-123", timeout=30.0, @@ -265,7 +263,6 @@ class TestA2APushNotificationHandler: mock_client = MagicMock() mock_client.send_message = mock_send_message - mock_client.set_task_callback = AsyncMock() config = PushNotificationConfig( url=AnyHttpUrl("http://localhost:8080/a2a/callback"),