@@ -1501,7 +1501,7 @@ def test_apply_sandbox_tools_creates_toolset_if_none(self, mock_context):
15011501 )
15021502 req = ProviderRequest (prompt = "Test" , func_tool = None )
15031503
1504- module ._apply_sandbox_tools (config , req , "session-123" , mock_context )
1504+ module ._apply_sandbox_tools (config , req , "session-123" )
15051505
15061506 assert req .func_tool is not None
15071507 assert isinstance (req .func_tool , ToolSet )
@@ -1516,7 +1516,7 @@ def test_apply_sandbox_tools_adds_required_tools(self, mock_context):
15161516 )
15171517 req = ProviderRequest (prompt = "Test" , func_tool = None )
15181518
1519- module ._apply_sandbox_tools (config , req , "session-123" , mock_context )
1519+ module ._apply_sandbox_tools (config , req , "session-123" )
15201520
15211521 tool_names = req .func_tool .names ()
15221522 assert "astrbot_execute_shell" in tool_names
@@ -1534,7 +1534,7 @@ def test_apply_sandbox_tools_adds_sandbox_prompt(self, mock_context):
15341534 )
15351535 req = ProviderRequest (prompt = "Test" , system_prompt = "Original prompt" )
15361536
1537- module ._apply_sandbox_tools (config , req , "session-123" , mock_context )
1537+ module ._apply_sandbox_tools (config , req , "session-123" )
15381538
15391539 assert "sandboxed environment" in req .system_prompt
15401540
@@ -1555,7 +1555,7 @@ def test_apply_sandbox_tools_with_shipyard_booter(self, monkeypatch, mock_contex
15551555 monkeypatch .delenv ("SHIPYARD_ENDPOINT" , raising = False )
15561556 monkeypatch .delenv ("SHIPYARD_ACCESS_TOKEN" , raising = False )
15571557
1558- module ._apply_sandbox_tools (config , req , "session-123" , mock_context )
1558+ module ._apply_sandbox_tools (config , req , "session-123" )
15591559
15601560 assert os .environ .get ("SHIPYARD_ENDPOINT" ) == "https://shipyard.example.com"
15611561 assert os .environ .get ("SHIPYARD_ACCESS_TOKEN" ) == "test-token"
@@ -1575,7 +1575,7 @@ def test_apply_sandbox_tools_shipyard_missing_endpoint(self, mock_context):
15751575 req = ProviderRequest (prompt = "Test" , func_tool = None )
15761576
15771577 with patch ("astrbot.core.astr_main_agent.logger" ) as mock_logger :
1578- module ._apply_sandbox_tools (config , req , "session-123" , mock_context )
1578+ module ._apply_sandbox_tools (config , req , "session-123" )
15791579
15801580 mock_logger .error .assert_called_once ()
15811581 assert (
@@ -1598,7 +1598,7 @@ def test_apply_sandbox_tools_shipyard_missing_access_token(self, mock_context):
15981598 req = ProviderRequest (prompt = "Test" , func_tool = None )
15991599
16001600 with patch ("astrbot.core.astr_main_agent.logger" ) as mock_logger :
1601- module ._apply_sandbox_tools (config , req , "session-123" , mock_context )
1601+ module ._apply_sandbox_tools (config , req , "session-123" )
16021602
16031603 mock_logger .error .assert_called_once ()
16041604
@@ -1616,7 +1616,7 @@ def test_apply_sandbox_tools_preserves_existing_toolset(self, mock_context):
16161616 existing_toolset .add_tool (existing_tool )
16171617 req = ProviderRequest (prompt = "Test" , func_tool = existing_toolset )
16181618
1619- module ._apply_sandbox_tools (config , req , "session-123" , mock_context )
1619+ module ._apply_sandbox_tools (config , req , "session-123" )
16201620
16211621 assert "existing_tool" in req .func_tool .names ()
16221622 assert "astrbot_execute_shell" in req .func_tool .names ()
@@ -1631,7 +1631,7 @@ def test_apply_sandbox_tools_appends_to_existing_system_prompt(self, mock_contex
16311631 )
16321632 req = ProviderRequest (prompt = "Test" , system_prompt = "Base prompt" )
16331633
1634- module ._apply_sandbox_tools (config , req , "session-123" , mock_context )
1634+ module ._apply_sandbox_tools (config , req , "session-123" )
16351635
16361636 assert req .system_prompt .startswith ("Base prompt" )
16371637 assert "sandboxed environment" in req .system_prompt
@@ -1646,7 +1646,7 @@ def test_apply_sandbox_tools_with_none_system_prompt(self, mock_context):
16461646 )
16471647 req = ProviderRequest (prompt = "Test" , system_prompt = None )
16481648
1649- module ._apply_sandbox_tools (config , req , "session-123" , mock_context )
1649+ module ._apply_sandbox_tools (config , req , "session-123" )
16501650
16511651 assert isinstance (req .system_prompt , str )
16521652 assert "sandboxed environment" in req .system_prompt
0 commit comments