4646 TaskNotCancelableError ,
4747 TaskPushNotificationConfig ,
4848 TaskQueryParams ,
49+ WellKnownUris ,
4950)
5051
5152
@@ -127,8 +128,7 @@ async def async_iterable_from_list(
127128
128129class TestA2ACardResolver :
129130 BASE_URL = 'http://example.com'
130- AGENT_CARD_PATH = '/.well-known/agent.json'
131- FULL_AGENT_CARD_URL = f'{ BASE_URL } { AGENT_CARD_PATH } '
131+ FULL_AGENT_CARD_URL = f'{ BASE_URL } { WellKnownUris .AGENT_CARD_WELL_KNOWN_URI } '
132132 EXTENDED_AGENT_CARD_PATH = (
133133 '/agent/authenticatedExtendedCard' # Default path
134134 )
@@ -153,20 +153,26 @@ async def test_init_parameters_stored_correctly(
153153 httpx_client = mock_httpx_client ,
154154 base_url = base_url ,
155155 )
156- assert resolver_default_path .agent_card_path == '.well-known/agent.json'
156+ assert (
157+ resolver_default_path .agent_card_path
158+ == WellKnownUris .AGENT_CARD_WELL_KNOWN_URI .lstrip ('/' )
159+ )
157160
158161 @pytest .mark .asyncio
159162 async def test_init_strips_slashes (self , mock_httpx_client : AsyncMock ):
160163 resolver = A2ACardResolver (
161164 httpx_client = mock_httpx_client ,
162165 base_url = 'http://example.com/' , # With trailing slash
163- agent_card_path = '/.well-known/agent.json /' , # With leading/trailing slash
166+ agent_card_path = f' { WellKnownUris . AGENT_CARD_WELL_KNOWN_URI } /' , # With leading/trailing slash
164167 )
165168 assert (
166169 resolver .base_url == 'http://example.com'
167170 ) # Trailing slash stripped
168171 # constructor lstrips agent_card_path, but keeps trailing if provided
169- assert resolver .agent_card_path == '.well-known/agent.json/'
172+ assert (
173+ resolver .agent_card_path
174+ == WellKnownUris .AGENT_CARD_WELL_KNOWN_URI .lstrip ('/' ) + '/'
175+ )
170176
171177 @pytest .mark .asyncio
172178 async def test_get_agent_card_success_public_only (
0 commit comments