Skip to content

Commit 4790ad0

Browse files
committed
Add test for snake_case
1 parent f60c53a commit 4790ad0

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/test_types.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,33 @@ def test_agent_card_invalid():
263263
AgentCard(**bad_card_data) # Missing name
264264

265265

266+
def test_agent_card_with_snake_case():
267+
card = AgentCard(
268+
capabilities={},
269+
default_input_modes=['text/plain'],
270+
default_output_modes=['application/json'],
271+
description='TestAgent',
272+
name='TestAgent',
273+
skills=[
274+
AgentSkill(
275+
id='skill-123',
276+
name='Recipe Finder',
277+
description='Finds recipes',
278+
tags=['cooking'],
279+
)
280+
],
281+
url='http://example.com/agent',
282+
version='1.0',
283+
)
284+
assert card.name == 'TestAgent'
285+
assert card.version == '1.0'
286+
assert len(card.skills) == 1
287+
assert card.skills[0].id == 'skill-123'
288+
assert card.provider is None # Optional
289+
assert card.default_input_modes[0] == 'text/plain'
290+
assert card.default_output_modes[0] == 'application/json'
291+
292+
266293
# --- Test Parts ---
267294

268295

0 commit comments

Comments
 (0)