66
77from a2a .client import A2AClient , ClientCallContext , ClientCallInterceptor
88from a2a .client .auth import AuthInterceptor , InMemoryContextCredentialStore
9- from a2a .types import (AgentCapabilities , AgentCard , APIKeySecurityScheme ,
10- AuthorizationCodeOAuthFlow , In , OAuth2SecurityScheme ,
11- OAuthFlows , OpenIdConnectSecurityScheme , SecurityScheme ,
12- SendMessageRequest )
9+ from a2a .types import (
10+ APIKeySecurityScheme ,
11+ AgentCapabilities ,
12+ AgentCard ,
13+ AuthorizationCodeOAuthFlow ,
14+ In ,
15+ OAuth2SecurityScheme ,
16+ OAuthFlows ,
17+ OpenIdConnectSecurityScheme ,
18+ SecurityScheme ,
19+ SendMessageRequest ,
20+ )
1321
1422
1523# A simple mock interceptor for testing basic middleware functionality
@@ -321,9 +329,7 @@ async def test_auth_interceptor_with_oidc_scheme():
321329 defaultOutputModes = [],
322330 skills = [],
323331 capabilities = AgentCapabilities (),
324- security = [
325- {scheme_name : []}
326- ],
332+ security = [{scheme_name : []}],
327333 securitySchemes = {
328334 scheme_name : SecurityScheme (
329335 root = OpenIdConnectSecurityScheme (
@@ -375,4 +381,4 @@ async def test_auth_interceptor_with_oidc_scheme():
375381 assert len (respx .calls ) == 1
376382 request_sent = respx .calls .last .request
377383 assert 'Authorization' in request_sent .headers
378- assert request_sent .headers ['Authorization' ] == f'Bearer { id_token } '
384+ assert request_sent .headers ['Authorization' ] == f'Bearer { id_token } '
0 commit comments