Skip to content

Commit 4fcf7c6

Browse files
committed
Formatting
1 parent bd41ca8 commit 4fcf7c6

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

tests/server/apps/jsonrpc/test_fastapi_app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ def mock_app_params(self) -> dict:
3939
# Ensure 'url' attribute exists on the mock_agent_card, as it's accessed
4040
# in __init__
4141
mock_agent_card.url = 'http://example.com'
42-
# Ensure 'supportsAuthenticatedExtendedCard' attribute exists
43-
mock_agent_card.supportsAuthenticatedExtendedCard = False
44-
return dict(agent_card=mock_agent_card, http_handler=mock_handler)
42+
# Ensure 'supports_authenticated_agent_card' attribute exists
43+
mock_agent_card.supports_authenticated_agent_card = False
44+
return {'agent_card': mock_agent_card, 'http_handler': mock_handler}
4545

4646
@pytest.fixture(scope='class')
4747
def mark_pkg_fastapi_not_installed(self):

tests/server/apps/jsonrpc/test_jsonrpc_app.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
StarletteBaseUser = MagicMock() # type: ignore
1414

1515
from a2a.extensions.common import HTTP_EXTENSION_HEADER
16-
from a2a.server.apps.jsonrpc import jsonrpc_app # Keep this import for optional deps test
16+
from a2a.server.apps.jsonrpc import (
17+
jsonrpc_app, # Keep this import for optional deps test
18+
)
1719
from a2a.server.apps.jsonrpc.jsonrpc_app import (
1820
JSONRPCApplication,
1921
StarletteUserProxy,
@@ -131,7 +133,7 @@ def mock_app_params(self) -> dict:
131133
mock_agent_card.url = 'http://example.com'
132134
# Ensure 'supportsAuthenticatedExtendedCard' attribute exists
133135
mock_agent_card.supports_authenticated_extended_card = False
134-
return dict(agent_card=mock_agent_card, http_handler=mock_handler)
136+
return {'agent_card': mock_agent_card, 'http_handler': mock_handler}
135137

136138
@pytest.fixture(scope='class')
137139
def mark_pkg_starlette_not_installed(self):
@@ -355,4 +357,4 @@ def side_effect(request, context: ServerCallContext):
355357

356358

357359
if __name__ == '__main__':
358-
pytest.main([__file__])
360+
pytest.main([__file__])

tests/server/apps/jsonrpc/test_starlette_app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ class TestA2AStarletteApplicationOptionalDeps:
2121
@pytest.fixture(scope='class', autouse=True)
2222
def ensure_pkg_starlette_is_present(self):
2323
try:
24-
import starlette as _starlette # noqa: F401
2524
import sse_starlette as _sse_starlette # noqa: F401
25+
import starlette as _starlette # noqa: F401
2626
except ImportError:
2727
pytest.fail(
2828
f'Running tests in {self.__class__.__name__} requires'
@@ -42,7 +42,7 @@ def mock_app_params(self) -> dict:
4242
mock_agent_card.url = 'http://example.com'
4343
# Ensure 'supportsAuthenticatedExtendedCard' attribute exists
4444
mock_agent_card.supportsAuthenticatedExtendedCard = False
45-
return dict(agent_card=mock_agent_card, http_handler=mock_handler)
45+
return {'agent_card': mock_agent_card, 'http_handler': mock_handler}
4646

4747
@pytest.fixture(scope='class')
4848
def mark_pkg_starlette_not_installed(self):

0 commit comments

Comments
 (0)