@@ -442,7 +442,7 @@ async def test_bind_param_success(self, tool_name, client):
442
442
assert len (tool .__signature__ .parameters ) == 2
443
443
assert "argA" in tool .__signature__ .parameters
444
444
445
- tool = tool .bind_parameters ({"argA" : 5 })
445
+ tool = tool .bind_params ({"argA" : 5 })
446
446
447
447
assert len (tool .__signature__ .parameters ) == 1
448
448
assert "argA" not in tool .__signature__ .parameters
@@ -458,7 +458,7 @@ async def test_bind_callable_param_success(self, tool_name, client):
458
458
assert len (tool .__signature__ .parameters ) == 2
459
459
assert "argA" in tool .__signature__ .parameters
460
460
461
- tool = tool .bind_parameters ({"argA" : lambda : 5 })
461
+ tool = tool .bind_params ({"argA" : lambda : 5 })
462
462
463
463
assert len (tool .__signature__ .parameters ) == 1
464
464
assert "argA" not in tool .__signature__ .parameters
@@ -468,34 +468,34 @@ async def test_bind_callable_param_success(self, tool_name, client):
468
468
469
469
@pytest .mark .asyncio
470
470
async def test_bind_param_fail (self , tool_name , client ):
471
- """Tests 'bind_parameters ' with a bound parameter that doesn't exist."""
471
+ """Tests 'bind_params ' with a bound parameter that doesn't exist."""
472
472
tool = await client .load_tool (tool_name )
473
473
474
474
assert len (tool .__signature__ .parameters ) == 2
475
475
assert "argA" in tool .__signature__ .parameters
476
476
477
477
with pytest .raises (Exception ) as e :
478
- tool .bind_parameters ({"argC" : lambda : 5 })
478
+ tool .bind_params ({"argC" : lambda : 5 })
479
479
assert "unable to bind parameters: no parameter named argC" in str (e .value )
480
480
481
481
@pytest .mark .asyncio
482
482
async def test_rebind_param_fail (self , tool_name , client ):
483
483
"""
484
- Tests that 'bind_parameters ' fails when attempting to re-bind a
484
+ Tests that 'bind_params ' fails when attempting to re-bind a
485
485
parameter that has already been bound.
486
486
"""
487
487
tool = await client .load_tool (tool_name )
488
488
489
489
assert len (tool .__signature__ .parameters ) == 2
490
490
assert "argA" in tool .__signature__ .parameters
491
491
492
- tool_with_bound_param = tool .bind_parameters ({"argA" : lambda : 10 })
492
+ tool_with_bound_param = tool .bind_params ({"argA" : lambda : 10 })
493
493
494
494
assert len (tool_with_bound_param .__signature__ .parameters ) == 1
495
495
assert "argA" not in tool_with_bound_param .__signature__ .parameters
496
496
497
497
with pytest .raises (ValueError ) as e :
498
- tool_with_bound_param .bind_parameters ({"argA" : lambda : 20 })
498
+ tool_with_bound_param .bind_params ({"argA" : lambda : 20 })
499
499
500
500
assert "cannot re-bind parameter: parameter 'argA' is already bound" in str (
501
501
e .value
@@ -504,13 +504,13 @@ async def test_rebind_param_fail(self, tool_name, client):
504
504
@pytest .mark .asyncio
505
505
async def test_bind_param_static_value_success (self , tool_name , client ):
506
506
"""
507
- Tests bind_parameters method with a static value.
507
+ Tests bind_params method with a static value.
508
508
"""
509
509
510
510
bound_value = "Test value"
511
511
512
512
tool = await client .load_tool (tool_name )
513
- bound_tool = tool .bind_parameters ({"argB" : bound_value })
513
+ bound_tool = tool .bind_params ({"argB" : bound_value })
514
514
515
515
assert bound_tool is not tool
516
516
assert "argB" not in bound_tool .__signature__ .parameters
@@ -524,14 +524,14 @@ async def test_bind_param_static_value_success(self, tool_name, client):
524
524
@pytest .mark .asyncio
525
525
async def test_bind_param_sync_callable_value_success (self , tool_name , client ):
526
526
"""
527
- Tests bind_parameters method with a sync callable value.
527
+ Tests bind_params method with a sync callable value.
528
528
"""
529
529
530
530
bound_value_result = True
531
531
bound_sync_callable = Mock (return_value = bound_value_result )
532
532
533
533
tool = await client .load_tool (tool_name )
534
- bound_tool = tool .bind_parameters ({"argB" : bound_sync_callable })
534
+ bound_tool = tool .bind_params ({"argB" : bound_sync_callable })
535
535
536
536
assert bound_tool is not tool
537
537
assert "argB" not in bound_tool .__signature__ .parameters
@@ -546,14 +546,14 @@ async def test_bind_param_sync_callable_value_success(self, tool_name, client):
546
546
@pytest .mark .asyncio
547
547
async def test_bind_param_async_callable_value_success (self , tool_name , client ):
548
548
"""
549
- Tests bind_parameters method with an async callable value.
549
+ Tests bind_params method with an async callable value.
550
550
"""
551
551
552
552
bound_value_result = True
553
553
bound_async_callable = AsyncMock (return_value = bound_value_result )
554
554
555
555
tool = await client .load_tool (tool_name )
556
- bound_tool = tool .bind_parameters ({"argB" : bound_async_callable })
556
+ bound_tool = tool .bind_params ({"argB" : bound_async_callable })
557
557
558
558
assert bound_tool is not tool
559
559
assert "argB" not in bound_tool .__signature__ .parameters
0 commit comments