1818 apply_workspace ,
1919 build_tool ,
2020)
21- from deepset_mcp .mcp .tool_models import MemoryType , ToolConfig , WorkspaceMode
21+ from deepset_mcp .mcp .tool_models import MemoryType , ToolConfig
2222from deepset_mcp .tokonomics import InMemoryBackend , ObjectStore
2323from test .unit .conftest import BaseFakeClient
2424
@@ -501,7 +501,7 @@ async def sample_func(a: int) -> str:
501501 return str (a )
502502
503503 config = ToolConfig ()
504- result = build_tool (sample_func , config , WorkspaceMode . STATIC )
504+ result = build_tool (sample_func , config )
505505
506506 # Should return async function
507507 assert inspect .iscoroutinefunction (result )
@@ -518,7 +518,7 @@ def sample_func(a: int) -> str:
518518 return str (a )
519519
520520 config = ToolConfig ()
521- result = build_tool (sample_func , config , WorkspaceMode . STATIC )
521+ result = build_tool (sample_func , config )
522522
523523 # Should return async function
524524 assert inspect .iscoroutinefunction (result )
@@ -549,7 +549,7 @@ async def sample_func(client: AsyncClientProtocol, workspace: str, a: int, custo
549549 custom_args = {"custom_arg" : "injected" },
550550 )
551551
552- result = build_tool (sample_func , config , WorkspaceMode . STATIC , workspace = "test-workspace" )
552+ result = build_tool (sample_func , config , workspace = "test-workspace" )
553553
554554 # Check final signature
555555 sig = inspect .signature (result )
@@ -578,9 +578,7 @@ async def sample_func(client: AsyncClientProtocol, workspace: str, a: int) -> st
578578 needs_workspace = True ,
579579 )
580580
581- result = build_tool (
582- sample_func , config , WorkspaceMode .STATIC , workspace = "test-workspace" , use_request_context = True
583- )
581+ result = build_tool (sample_func , config , workspace = "test-workspace" , use_request_context = True )
584582
585583 # Mock the context and use FakeClient
586584 mock_ctx = MagicMock ()
@@ -611,7 +609,7 @@ async def sample_func(a: int, b: str) -> str:
611609 needs_workspace = False ,
612610 )
613611
614- result = build_tool (sample_func , config , WorkspaceMode . STATIC )
612+ result = build_tool (sample_func , config )
615613
616614 # Should work without ctx
617615 output = await result (a = 42 , b = "test" )
@@ -633,7 +631,7 @@ async def sample_func(a: int) -> str:
633631 mock_explorable .return_value = mock_decorator
634632 mock_decorator .return_value = sample_func
635633
636- build_tool (sample_func , config , WorkspaceMode . STATIC , object_store = object_store )
634+ build_tool (sample_func , config , object_store = object_store )
637635
638636 # Should have applied the decorator
639637 mock_explorable .assert_called_once ()
@@ -647,7 +645,7 @@ async def sample_func(client: AsyncClientProtocol, a: int) -> str:
647645 return str (a )
648646
649647 config = ToolConfig (needs_client = True )
650- result = build_tool (sample_func , config , WorkspaceMode . STATIC )
648+ result = build_tool (sample_func , config )
651649
652650 # Test missing context
653651 with pytest .raises (ValueError , match = "Context is required" ):
@@ -675,7 +673,7 @@ async def sample_func(client: AsyncClientProtocol, a: int) -> str:
675673
676674 config = ToolConfig (needs_client = True )
677675 custom_url = "https://custom.api.example.com"
678- result = build_tool (sample_func , config , WorkspaceMode . STATIC , base_url = custom_url )
676+ result = build_tool (sample_func , config , base_url = custom_url )
679677
680678 # Mock the context
681679 mock_ctx = MagicMock ()
0 commit comments