Skip to content

Commit 694eb63

Browse files
committed
Remove more tests
1 parent 9b3e847 commit 694eb63

File tree

1 file changed

+0
-48
lines changed

1 file changed

+0
-48
lines changed

tests/utils/test_proto_utils.py

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from a2a import types
44
from a2a.grpc import a2a_pb2
55
from a2a.utils import proto_utils
6-
from a2a.utils.errors import ServerError
76

87

98
# --- Test Data ---
@@ -119,17 +118,6 @@ def test_roundtrip_message(self, sample_message: types.Message):
119118
roundtrip_msg = proto_utils.FromProto.message(proto_msg)
120119
assert roundtrip_msg == sample_message
121120

122-
def test_roundtrip_agent_card(self, sample_agent_card: types.AgentCard):
123-
"""Test conversion of AgentCard to proto and back."""
124-
proto_card = proto_utils.ToProto.agent_card(sample_agent_card)
125-
assert isinstance(proto_card, a2a_pb2.AgentCard)
126-
127-
roundtrip_card = proto_utils.FromProto.agent_card(proto_card)
128-
# Pydantic models with nested dicts/lists might not be equal after roundtrip, so check fields
129-
assert roundtrip_card.name == sample_agent_card.name
130-
assert roundtrip_card.provider == sample_agent_card.provider
131-
assert roundtrip_card.skills == sample_agent_card.skills
132-
133121
def test_enum_conversions(self):
134122
"""Test conversions for all enum types."""
135123
assert (
@@ -162,42 +150,6 @@ def test_enum_conversions(self):
162150
== a2a_pb2.TaskState.TASK_STATE_UNSPECIFIED
163151
)
164152

165-
def test_task_id_params_parsing(self):
166-
"""Test parsing of task and push notification config names."""
167-
cancel_req = a2a_pb2.CancelTaskRequest(name='tasks/task-123')
168-
params = proto_utils.FromProto.task_id_params(cancel_req)
169-
assert params.id == 'task-123'
170-
171-
push_req = a2a_pb2.GetTaskPushNotificationRequest(
172-
name='tasks/task-456/pushNotifications/config-789'
173-
)
174-
params_push = proto_utils.FromProto.task_id_params(push_req)
175-
assert params_push.id == 'task-456'
176-
177-
with pytest.raises(ServerError):
178-
proto_utils.FromProto.task_id_params(
179-
a2a_pb2.CancelTaskRequest(name='invalid/name')
180-
)
181-
182-
with pytest.raises(ServerError):
183-
proto_utils.FromProto.task_id_params(
184-
a2a_pb2.GetTaskPushNotificationRequest(name='invalid/name')
185-
)
186-
187-
def test_task_query_params_parsing(self):
188-
"""Test parsing of GetTaskRequest."""
189-
get_req = a2a_pb2.GetTaskRequest(
190-
name='tasks/task-abc', history_length=10
191-
)
192-
params = proto_utils.FromProto.task_query_params(get_req)
193-
assert params.id == 'task-abc'
194-
assert params.historyLength == 10
195-
196-
with pytest.raises(ServerError):
197-
proto_utils.FromProto.task_query_params(
198-
a2a_pb2.GetTaskRequest(name='invalid/name')
199-
)
200-
201153
def test_oauth_flows_conversion(self):
202154
"""Test conversion of different OAuth2 flows."""
203155
# Test password flow

0 commit comments

Comments
 (0)