File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -1551,8 +1551,22 @@ def test_camelCase() -> None:
15511551 supportsAuthenticatedExtendedCard = True ,
15521552 )
15531553
1554- agent_card .supportsAuthenticatedExtendedCard = False
1555-
1556- default_input_modes = agent_card .defaultInputModes
1557- assert agent_card
1554+ # Test setting an attribute via camelCase alias
1555+ # We expect a DeprecationWarning with a specific message
1556+ with pytest .warns (
1557+ DeprecationWarning ,
1558+ match = "Setting field 'supportsAuthenticatedExtendedCard'" ,
1559+ ):
1560+ agent_card .supportsAuthenticatedExtendedCard = False
1561+
1562+ # Test getting an attribute via camelCase alias
1563+ # We expect another DeprecationWarning with a specific message
1564+ with pytest .warns (
1565+ DeprecationWarning , match = "Accessing field 'defaultInputModes'"
1566+ ):
1567+ default_input_modes = agent_card .defaultInputModes
1568+
1569+ # Assert the functionality still works as expected
1570+ assert agent_card .supports_authenticated_extended_card is False
15581571 assert default_input_modes == ['text' ]
1572+ assert agent_card .default_input_modes == ['text' ]
You can’t perform that action at this time.
0 commit comments