Skip to content

Commit a579d61

Browse files
authored
Merge branch 'main' into sql-support
2 parents 3b5f8d6 + bf939a8 commit a579d61

File tree

2 files changed

+31
-43
lines changed

2 files changed

+31
-43
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22

33
We'd love to accept your patches and contributions to this project.
44

5-
## Before you begin
6-
7-
### Review our community guidelines
8-
9-
This project follows
10-
[Google's Open Source Community Guidelines](https://opensource.google/conduct/).
11-
125
## Contribution process
136

147
### Code reviews
@@ -33,11 +26,3 @@ Here are some additional things to keep in mind during the process:
3326

3427
- **Test your changes.** Before you submit a pull request, make sure that your changes work as expected.
3528
- **Be patient.** It may take some time for your pull request to be reviewed and merged.
36-
37-
---
38-
39-
## For Google Employees
40-
41-
Complete the following steps to register your GitHub account and be added as a contributor to this repository.
42-
43-
1. Register your GitHub account at [go/GitHub](http://go/github).

tests/client/test_auth_middleware.py

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@
1212
AgentCard,
1313
AuthorizationCodeOAuthFlow,
1414
In,
15+
Message,
16+
MessageSendParams,
1517
OAuth2SecurityScheme,
1618
OAuthFlows,
1719
OpenIdConnectSecurityScheme,
20+
Role,
1821
SecurityScheme,
1922
SendMessageRequest,
2023
)
@@ -76,13 +79,13 @@ async def test_client_with_simple_interceptor():
7679
await client.send_message(
7780
request=SendMessageRequest(
7881
id='1',
79-
params={
80-
'message': {
81-
'messageId': 'msg1',
82-
'role': 'user',
83-
'parts': [],
84-
}
85-
},
82+
params=MessageSendParams(
83+
message=Message(
84+
messageId='msg1',
85+
role=Role.user,
86+
parts=[],
87+
)
88+
),
8689
)
8790
)
8891

@@ -198,13 +201,13 @@ async def test_auth_interceptor_with_api_key():
198201
await client.send_message(
199202
request=SendMessageRequest(
200203
id='1',
201-
params={
202-
'message': {
203-
'messageId': 'msg1',
204-
'role': 'user',
205-
'parts': [],
206-
}
207-
},
204+
params=MessageSendParams(
205+
message=Message(
206+
messageId='msg1',
207+
role=Role.user,
208+
parts=[],
209+
)
210+
),
208211
),
209212
context=context,
210213
)
@@ -284,13 +287,13 @@ async def test_auth_interceptor_with_oauth2_scheme():
284287
await client.send_message(
285288
request=SendMessageRequest(
286289
id='oauth_test_1',
287-
params={
288-
'message': {
289-
'messageId': 'msg-oauth',
290-
'role': 'user',
291-
'parts': [],
292-
}
293-
},
290+
params=MessageSendParams(
291+
message=Message(
292+
messageId='msg-oauth',
293+
role=Role.user,
294+
parts=[],
295+
)
296+
),
294297
),
295298
context=context,
296299
)
@@ -366,13 +369,13 @@ async def test_auth_interceptor_with_oidc_scheme():
366369
await client.send_message(
367370
request=SendMessageRequest(
368371
id='oidc_test_1',
369-
params={
370-
'message': {
371-
'messageId': 'msg-oidc',
372-
'role': 'user',
373-
'parts': [],
374-
}
375-
},
372+
params=MessageSendParams(
373+
message=Message(
374+
messageId='msg-oidc',
375+
role=Role.user,
376+
parts=[],
377+
)
378+
),
376379
),
377380
context=context,
378381
)

0 commit comments

Comments
 (0)