Skip to content

Commit c74879d

Browse files
knileshhhangfei
andauthored
fix: Correct various typos in CHANGELOG.md and test_rest_api_tool.py (#498)
Corrected the following spelling errors: - CHANGELOG.md: "impprovements" -> "improvements" - test_rest_api_tool.py: "def sample_endpiont:" -> "def sample_endpoint:" - Updated all the references of sample_endpiont -> sample_endpoint as well. - CHANGELOG.md: "credentails" -> "credentials" - CHANGELOG.md: "auido" -> "audio" Co-authored-by: Hangfei Lin <hangfei@google.com>
1 parent 6595cda commit c74879d

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

CHANGELOG.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
### ⚠ BREAKING CHANGES
2828

2929
* Auth: expose `access_token` and `refresh_token` at top level of auth
30-
credentails, instead of a `dict`
30+
credentials, instead of a `dict`
3131
([commit](https://github.com/google/adk-python/commit/956fb912e8851b139668b1ccb8db10fd252a6990)).
3232

3333
### Features
@@ -50,7 +50,7 @@
5050

5151
### Miscellaneous Chores
5252

53-
* README.md impprovements.
53+
* README.md improvements.
5454
* Various code improvements.
5555
* Various typo fixes.
5656
* Bump min version of google-genai to 1.11.0.
@@ -108,4 +108,4 @@
108108
* Built-in evaluation support
109109
* Development UI that makes local development easy
110110
* Deploy to Google Cloud Run, Agent Engine
111-
* (Experimental) Live(Bidi) auido/video agent support and Compositional Function Calling(CFC) support
111+
* (Experimental) Live(Bidi) audio/video agent support and Compositional Function Calling(CFC) support

tests/unittests/tools/openapi_tool/openapi_spec_parser/test_rest_api_tool.py

+38-38
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def mock_operation_parser(self):
6161
return mock_parser
6262

6363
@pytest.fixture
64-
def sample_endpiont(self):
64+
def sample_endpoint(self):
6565
return OperationEndpoint(
6666
base_url="https://example.com", path="/test", method="GET"
6767
)
@@ -131,38 +131,38 @@ def sample_auth_credential(self):
131131

132132
def test_init(
133133
self,
134-
sample_endpiont,
134+
sample_endpoint,
135135
sample_operation,
136136
sample_auth_scheme,
137137
sample_auth_credential,
138138
):
139139
tool = RestApiTool(
140140
name="test_tool",
141141
description="Test Tool",
142-
endpoint=sample_endpiont,
142+
endpoint=sample_endpoint,
143143
operation=sample_operation,
144144
auth_scheme=sample_auth_scheme,
145145
auth_credential=sample_auth_credential,
146146
)
147147
assert tool.name == "test_tool"
148148
assert tool.description == "Test Tool"
149-
assert tool.endpoint == sample_endpiont
149+
assert tool.endpoint == sample_endpoint
150150
assert tool.operation == sample_operation
151151
assert tool.auth_credential == sample_auth_credential
152152
assert tool.auth_scheme == sample_auth_scheme
153153
assert tool.credential_exchanger is not None
154154

155155
def test_from_parsed_operation_str(
156156
self,
157-
sample_endpiont,
157+
sample_endpoint,
158158
sample_api_parameters,
159159
sample_return_parameter,
160160
sample_operation,
161161
):
162162
parsed_operation_str = json.dumps({
163163
"name": "test_operation",
164164
"description": "Test Description",
165-
"endpoint": sample_endpiont.model_dump(),
165+
"endpoint": sample_endpoint.model_dump(),
166166
"operation": sample_operation.model_dump(),
167167
"auth_scheme": None,
168168
"auth_credential": None,
@@ -174,12 +174,12 @@ def test_from_parsed_operation_str(
174174
assert tool.name == "test_operation"
175175

176176
def test_get_declaration(
177-
self, sample_endpiont, sample_operation, mock_operation_parser
177+
self, sample_endpoint, sample_operation, mock_operation_parser
178178
):
179179
tool = RestApiTool(
180180
name="test_tool",
181181
description="Test description",
182-
endpoint=sample_endpiont,
182+
endpoint=sample_endpoint,
183183
operation=sample_operation,
184184
should_parse_operation=False,
185185
)
@@ -198,7 +198,7 @@ def test_call_success(
198198
self,
199199
mock_request,
200200
mock_tool_context,
201-
sample_endpiont,
201+
sample_endpoint,
202202
sample_operation,
203203
sample_auth_scheme,
204204
sample_auth_credential,
@@ -210,7 +210,7 @@ def test_call_success(
210210
tool = RestApiTool(
211211
name="test_tool",
212212
description="Test Tool",
213-
endpoint=sample_endpiont,
213+
endpoint=sample_endpoint,
214214
operation=sample_operation,
215215
auth_scheme=sample_auth_scheme,
216216
auth_credential=sample_auth_credential,
@@ -228,7 +228,7 @@ def test_call_success(
228228
def test_call_auth_pending(
229229
self,
230230
mock_request,
231-
sample_endpiont,
231+
sample_endpoint,
232232
sample_operation,
233233
sample_auth_scheme,
234234
sample_auth_credential,
@@ -237,7 +237,7 @@ def test_call_auth_pending(
237237
tool = RestApiTool(
238238
name="test_tool",
239239
description="Test Tool",
240-
endpoint=sample_endpiont,
240+
endpoint=sample_endpoint,
241241
operation=sample_operation,
242242
auth_scheme=sample_auth_scheme,
243243
auth_credential=sample_auth_credential,
@@ -258,7 +258,7 @@ def test_call_auth_pending(
258258
}
259259

260260
def test_prepare_request_params_query_body(
261-
self, sample_endpiont, sample_auth_credential, sample_auth_scheme
261+
self, sample_endpoint, sample_auth_credential, sample_auth_scheme
262262
):
263263
# Create a mock Operation object
264264
mock_operation = Operation(
@@ -288,7 +288,7 @@ def test_prepare_request_params_query_body(
288288
tool = RestApiTool(
289289
name="test_tool",
290290
description="test",
291-
endpoint=sample_endpiont,
291+
endpoint=sample_endpoint,
292292
operation=mock_operation,
293293
auth_credential=sample_auth_credential,
294294
auth_scheme=sample_auth_scheme,
@@ -327,7 +327,7 @@ def test_prepare_request_params_query_body(
327327
assert request_params["params"] == {"testQueryParam": "query_value"}
328328

329329
def test_prepare_request_params_array(
330-
self, sample_endpiont, sample_auth_scheme, sample_auth_credential
330+
self, sample_endpoint, sample_auth_scheme, sample_auth_credential
331331
):
332332
mock_operation = Operation(
333333
operationId="test_op",
@@ -345,7 +345,7 @@ def test_prepare_request_params_array(
345345
tool = RestApiTool(
346346
name="test_tool",
347347
description="test",
348-
endpoint=sample_endpiont,
348+
endpoint=sample_endpoint,
349349
operation=mock_operation,
350350
auth_credential=sample_auth_credential,
351351
auth_scheme=sample_auth_scheme,
@@ -367,7 +367,7 @@ def test_prepare_request_params_array(
367367
assert request_params["json"] == ["item1", "item2"]
368368

369369
def test_prepare_request_params_string(
370-
self, sample_endpiont, sample_auth_credential, sample_auth_scheme
370+
self, sample_endpoint, sample_auth_credential, sample_auth_scheme
371371
):
372372
mock_operation = Operation(
373373
operationId="test_op",
@@ -380,7 +380,7 @@ def test_prepare_request_params_string(
380380
tool = RestApiTool(
381381
name="test_tool",
382382
description="Test Tool",
383-
endpoint=sample_endpiont,
383+
endpoint=sample_endpoint,
384384
operation=mock_operation,
385385
auth_credential=sample_auth_credential,
386386
auth_scheme=sample_auth_scheme,
@@ -401,7 +401,7 @@ def test_prepare_request_params_string(
401401
assert request_params["headers"]["Content-Type"] == "text/plain"
402402

403403
def test_prepare_request_params_form_data(
404-
self, sample_endpiont, sample_auth_scheme, sample_auth_credential
404+
self, sample_endpoint, sample_auth_scheme, sample_auth_credential
405405
):
406406
mock_operation = Operation(
407407
operationId="test_op",
@@ -419,7 +419,7 @@ def test_prepare_request_params_form_data(
419419
tool = RestApiTool(
420420
name="test_tool",
421421
description="test",
422-
endpoint=sample_endpiont,
422+
endpoint=sample_endpoint,
423423
operation=mock_operation,
424424
auth_credential=sample_auth_credential,
425425
auth_scheme=sample_auth_scheme,
@@ -443,7 +443,7 @@ def test_prepare_request_params_form_data(
443443
)
444444

445445
def test_prepare_request_params_multipart(
446-
self, sample_endpiont, sample_auth_credential, sample_auth_scheme
446+
self, sample_endpoint, sample_auth_credential, sample_auth_scheme
447447
):
448448
mock_operation = Operation(
449449
operationId="test_op",
@@ -465,7 +465,7 @@ def test_prepare_request_params_multipart(
465465
tool = RestApiTool(
466466
name="test_tool",
467467
description="test",
468-
endpoint=sample_endpiont,
468+
endpoint=sample_endpoint,
469469
operation=mock_operation,
470470
auth_credential=sample_auth_credential,
471471
auth_scheme=sample_auth_scheme,
@@ -486,7 +486,7 @@ def test_prepare_request_params_multipart(
486486
assert request_params["headers"]["Content-Type"] == "multipart/form-data"
487487

488488
def test_prepare_request_params_octet_stream(
489-
self, sample_endpiont, sample_auth_scheme, sample_auth_credential
489+
self, sample_endpoint, sample_auth_scheme, sample_auth_credential
490490
):
491491
mock_operation = Operation(
492492
operationId="test_op",
@@ -501,7 +501,7 @@ def test_prepare_request_params_octet_stream(
501501
tool = RestApiTool(
502502
name="test_tool",
503503
description="test",
504-
endpoint=sample_endpiont,
504+
endpoint=sample_endpoint,
505505
operation=mock_operation,
506506
auth_credential=sample_auth_credential,
507507
auth_scheme=sample_auth_scheme,
@@ -524,13 +524,13 @@ def test_prepare_request_params_octet_stream(
524524
)
525525

526526
def test_prepare_request_params_path_param(
527-
self, sample_endpiont, sample_auth_credential, sample_auth_scheme
527+
self, sample_endpoint, sample_auth_credential, sample_auth_scheme
528528
):
529529
mock_operation = Operation(operationId="test_op")
530530
tool = RestApiTool(
531531
name="test_tool",
532532
description="Test Tool",
533-
endpoint=sample_endpiont,
533+
endpoint=sample_endpoint,
534534
operation=mock_operation,
535535
auth_credential=sample_auth_credential,
536536
auth_scheme=sample_auth_scheme,
@@ -557,15 +557,15 @@ def test_prepare_request_params_path_param(
557557

558558
def test_prepare_request_params_header_param(
559559
self,
560-
sample_endpiont,
560+
sample_endpoint,
561561
sample_auth_credential,
562562
sample_auth_scheme,
563563
sample_operation,
564564
):
565565
tool = RestApiTool(
566566
name="test_tool",
567567
description="Test Tool",
568-
endpoint=sample_endpiont,
568+
endpoint=sample_endpoint,
569569
operation=sample_operation,
570570
auth_credential=sample_auth_credential,
571571
auth_scheme=sample_auth_scheme,
@@ -586,15 +586,15 @@ def test_prepare_request_params_header_param(
586586

587587
def test_prepare_request_params_cookie_param(
588588
self,
589-
sample_endpiont,
589+
sample_endpoint,
590590
sample_auth_credential,
591591
sample_auth_scheme,
592592
sample_operation,
593593
):
594594
tool = RestApiTool(
595595
name="test_tool",
596596
description="Test Tool",
597-
endpoint=sample_endpiont,
597+
endpoint=sample_endpoint,
598598
operation=sample_operation,
599599
auth_credential=sample_auth_credential,
600600
auth_scheme=sample_auth_scheme,
@@ -614,7 +614,7 @@ def test_prepare_request_params_cookie_param(
614614
assert request_params["cookies"]["session_id"] == "cookie_value"
615615

616616
def test_prepare_request_params_multiple_mime_types(
617-
self, sample_endpiont, sample_auth_credential, sample_auth_scheme
617+
self, sample_endpoint, sample_auth_credential, sample_auth_scheme
618618
):
619619
# Test what happens when multiple mime types are specified. It should take
620620
# the first one.
@@ -632,7 +632,7 @@ def test_prepare_request_params_multiple_mime_types(
632632
tool = RestApiTool(
633633
name="test_tool",
634634
description="Test Tool",
635-
endpoint=sample_endpiont,
635+
endpoint=sample_endpoint,
636636
operation=mock_operation,
637637
auth_credential=sample_auth_credential,
638638
auth_scheme=sample_auth_scheme,
@@ -653,15 +653,15 @@ def test_prepare_request_params_multiple_mime_types(
653653

654654
def test_prepare_request_params_unknown_parameter(
655655
self,
656-
sample_endpiont,
656+
sample_endpoint,
657657
sample_auth_credential,
658658
sample_auth_scheme,
659659
sample_operation,
660660
):
661661
tool = RestApiTool(
662662
name="test_tool",
663663
description="Test Tool",
664-
endpoint=sample_endpiont,
664+
endpoint=sample_endpoint,
665665
operation=sample_operation,
666666
auth_credential=sample_auth_credential,
667667
auth_scheme=sample_auth_scheme,
@@ -719,15 +719,15 @@ def test_prepare_request_params_base_url_handling(
719719

720720
def test_prepare_request_params_no_unrecognized_query_parameter(
721721
self,
722-
sample_endpiont,
722+
sample_endpoint,
723723
sample_auth_credential,
724724
sample_auth_scheme,
725725
sample_operation,
726726
):
727727
tool = RestApiTool(
728728
name="test_tool",
729729
description="Test Tool",
730-
endpoint=sample_endpiont,
730+
endpoint=sample_endpoint,
731731
operation=sample_operation,
732732
auth_credential=sample_auth_credential,
733733
auth_scheme=sample_auth_scheme,
@@ -748,13 +748,13 @@ def test_prepare_request_params_no_unrecognized_query_parameter(
748748

749749
def test_prepare_request_params_no_credential(
750750
self,
751-
sample_endpiont,
751+
sample_endpoint,
752752
sample_operation,
753753
):
754754
tool = RestApiTool(
755755
name="test_tool",
756756
description="Test Tool",
757-
endpoint=sample_endpiont,
757+
endpoint=sample_endpoint,
758758
operation=sample_operation,
759759
auth_credential=None,
760760
auth_scheme=None,

0 commit comments

Comments
 (0)