Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/toolbox-core/src/toolbox_core/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(
client_headers: Optional[
Mapping[str, Union[Callable[[], str], Callable[[], Awaitable[str]], str]]
] = None,
protocol: Protocol = Protocol.TOOLBOX,
protocol: Protocol = Protocol.MCP,
):
"""
Initializes the ToolboxClient.
Expand Down
3 changes: 2 additions & 1 deletion packages/toolbox-core/tests/test_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
from pydantic import ValidationError

from toolbox_core.client import ToolboxClient
from toolbox_core.protocol import Protocol
from toolbox_core.tool import ToolboxTool


# --- Shared Fixtures Defined at Module Level ---
@pytest_asyncio.fixture(scope="function")
async def toolbox():
"""Creates a ToolboxClient instance shared by all tests in this module."""
toolbox = ToolboxClient("http://localhost:5000")
toolbox = ToolboxClient("http://localhost:5000", protocol=Protocol.TOOLBOX)
try:
yield toolbox
finally:
Expand Down
3 changes: 1 addition & 2 deletions packages/toolbox-core/tests/test_e2e_mcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@
from pydantic import ValidationError

from toolbox_core.client import ToolboxClient
from toolbox_core.protocol import Protocol
from toolbox_core.tool import ToolboxTool


# --- Shared Fixtures Defined at Module Level ---
@pytest_asyncio.fixture(scope="function")
async def toolbox():
"""Creates a ToolboxClient instance shared by all tests in this module."""
toolbox = ToolboxClient("http://localhost:5000", protocol=Protocol.MCP)
toolbox = ToolboxClient("http://localhost:5000")
try:
yield toolbox
finally:
Expand Down
2 changes: 1 addition & 1 deletion packages/toolbox-core/tests/test_sync_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def test_run_tool_wrong_auth(self, toolbox: ToolboxSyncClient, auth_token2: str)
auth_tool = tool.add_auth_token_getters({"my-test-auth": lambda: auth_token2})
with pytest.raises(
Exception,
match="tool invocation not authorized",
match="tool invocation not authorized. Please make sure your specify correct auth headers",
):
auth_tool(id="2")

Expand Down