@@ -25,7 +25,7 @@ def base_agent_card() -> AgentCard:
2525 description = 'An agent for testing.' ,
2626 supported_interfaces = [
2727 AgentInterface (
28- protocol_binding = TransportProtocol .jsonrpc ,
28+ protocol_binding = TransportProtocol .JSONRPC ,
2929 url = 'http://primary-url.com' ,
3030 )
3131 ],
@@ -42,8 +42,8 @@ def test_client_factory_selects_preferred_transport(base_agent_card: AgentCard):
4242 config = ClientConfig (
4343 httpx_client = httpx .AsyncClient (),
4444 supported_protocol_bindings = [
45- TransportProtocol .jsonrpc ,
46- TransportProtocol .http_json ,
45+ TransportProtocol .JSONRPC ,
46+ TransportProtocol .HTTP_JSON ,
4747 ],
4848 extensions = ['https://example.com/test-ext/v0' ],
4949 )
@@ -61,16 +61,16 @@ def test_client_factory_selects_secondary_transport_url(
6161 """Verify that the factory selects the correct URL for a secondary transport."""
6262 base_agent_card .supported_interfaces .append (
6363 AgentInterface (
64- protocol_binding = TransportProtocol .http_json ,
64+ protocol_binding = TransportProtocol .HTTP_JSON ,
6565 url = 'http://secondary-url.com' ,
6666 )
6767 )
6868 # Client prefers REST, which is available as a secondary transport
6969 config = ClientConfig (
7070 httpx_client = httpx .AsyncClient (),
7171 supported_protocol_bindings = [
72- TransportProtocol .http_json ,
73- TransportProtocol .jsonrpc ,
72+ TransportProtocol .HTTP_JSON ,
73+ TransportProtocol .JSONRPC ,
7474 ],
7575 use_client_preference = True ,
7676 extensions = ['https://example.com/test-ext/v0' ],
@@ -89,22 +89,22 @@ def test_client_factory_server_preference(base_agent_card: AgentCard):
8989 base_agent_card .supported_interfaces .insert (
9090 0 ,
9191 AgentInterface (
92- protocol_binding = TransportProtocol .http_json ,
92+ protocol_binding = TransportProtocol .HTTP_JSON ,
9393 url = 'http://primary-url.com' ,
9494 ),
9595 )
9696 base_agent_card .supported_interfaces .append (
9797 AgentInterface (
98- protocol_binding = TransportProtocol .jsonrpc ,
98+ protocol_binding = TransportProtocol .JSONRPC ,
9999 url = 'http://secondary-url.com' ,
100100 )
101101 )
102102 # Client supports both, but server prefers REST
103103 config = ClientConfig (
104104 httpx_client = httpx .AsyncClient (),
105105 supported_protocol_bindings = [
106- TransportProtocol .jsonrpc ,
107- TransportProtocol .http_json ,
106+ TransportProtocol .JSONRPC ,
107+ TransportProtocol .HTTP_JSON ,
108108 ],
109109 )
110110 factory = ClientFactory (config )
0 commit comments