mirror of
https://github.com/langgenius/dify.git
synced 2026-04-28 11:56:55 +08:00
fix(tests): correct keyword arguments in tool provider test constructors (#33767)
This commit is contained in:
parent
11e1787100
commit
7d19825659
@ -48,41 +48,42 @@ class TestToolTransformService:
|
|||||||
name=fake.company(),
|
name=fake.company(),
|
||||||
description=fake.text(max_nb_chars=100),
|
description=fake.text(max_nb_chars=100),
|
||||||
icon='{"background": "#FF6B6B", "content": "🔧"}',
|
icon='{"background": "#FF6B6B", "content": "🔧"}',
|
||||||
icon_dark='{"background": "#252525", "content": "🔧"}',
|
|
||||||
tenant_id="test_tenant_id",
|
tenant_id="test_tenant_id",
|
||||||
user_id="test_user_id",
|
user_id="test_user_id",
|
||||||
credentials={"auth_type": "api_key_header", "api_key": "test_key"},
|
credentials_str='{"auth_type": "api_key_header", "api_key": "test_key"}',
|
||||||
provider_type="api",
|
schema="{}",
|
||||||
|
schema_type_str="openapi",
|
||||||
|
tools_str="[]",
|
||||||
)
|
)
|
||||||
elif provider_type == "builtin":
|
elif provider_type == "builtin":
|
||||||
provider = BuiltinToolProvider(
|
provider = BuiltinToolProvider(
|
||||||
name=fake.company(),
|
name=fake.company(),
|
||||||
description=fake.text(max_nb_chars=100),
|
|
||||||
icon="🔧",
|
|
||||||
icon_dark="🔧",
|
|
||||||
tenant_id="test_tenant_id",
|
tenant_id="test_tenant_id",
|
||||||
|
user_id="test_user_id",
|
||||||
provider="test_provider",
|
provider="test_provider",
|
||||||
credential_type="api_key",
|
credential_type="api_key",
|
||||||
credentials={"api_key": "test_key"},
|
encrypted_credentials='{"api_key": "test_key"}',
|
||||||
)
|
)
|
||||||
elif provider_type == "workflow":
|
elif provider_type == "workflow":
|
||||||
provider = WorkflowToolProvider(
|
provider = WorkflowToolProvider(
|
||||||
name=fake.company(),
|
name=fake.company(),
|
||||||
description=fake.text(max_nb_chars=100),
|
description=fake.text(max_nb_chars=100),
|
||||||
icon='{"background": "#FF6B6B", "content": "🔧"}',
|
icon='{"background": "#FF6B6B", "content": "🔧"}',
|
||||||
icon_dark='{"background": "#252525", "content": "🔧"}',
|
|
||||||
tenant_id="test_tenant_id",
|
tenant_id="test_tenant_id",
|
||||||
user_id="test_user_id",
|
user_id="test_user_id",
|
||||||
workflow_id="test_workflow_id",
|
app_id="test_workflow_id",
|
||||||
|
label="Test Workflow",
|
||||||
|
version="1.0.0",
|
||||||
|
parameter_configuration="[]",
|
||||||
)
|
)
|
||||||
elif provider_type == "mcp":
|
elif provider_type == "mcp":
|
||||||
provider = MCPToolProvider(
|
provider = MCPToolProvider(
|
||||||
name=fake.company(),
|
name=fake.company(),
|
||||||
description=fake.text(max_nb_chars=100),
|
icon='{"background": "#FF6B6B", "content": "🔧"}',
|
||||||
provider_icon='{"background": "#FF6B6B", "content": "🔧"}',
|
|
||||||
tenant_id="test_tenant_id",
|
tenant_id="test_tenant_id",
|
||||||
user_id="test_user_id",
|
user_id="test_user_id",
|
||||||
server_url="https://mcp.example.com",
|
server_url="https://mcp.example.com",
|
||||||
|
server_url_hash="test_server_url_hash",
|
||||||
server_identifier="test_server",
|
server_identifier="test_server",
|
||||||
tools='[{"name": "test_tool", "description": "Test tool"}]',
|
tools='[{"name": "test_tool", "description": "Test tool"}]',
|
||||||
authed=True,
|
authed=True,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user