Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix(tests): correct keyword arguments in tool provider test constructors (#33767)

Tim Ren7d19825659ab
diff --git a/api/tests/test_containers_integration_tests/services/tools/test_tools_transform_service.py b/api/tests/test_containers_integration_tests/services/tools/test_tools_transform_service.py
index f3736333eae..0f38218c51b 100644
--- a/api/tests/test_containers_integration_tests/services/tools/test_tools_transform_service.py
+++ b/api/tests/test_containers_integration_tests/services/tools/test_tools_transform_service.py
@@ -48,41 +48,42 @@ class TestToolTransformService:
name=fake.company(),
description=fake.text(max_nb_chars=100),
icon='{"background": "#FF6B6B", "content": "🔧"}',
- icon_dark='{"background": "#252525", "content": "🔧"}',
tenant_id="test_tenant_id",
user_id="test_user_id",
- credentials={"auth_type": "api_key_header", "api_key": "test_key"},
- provider_type="api",
+ credentials_str='{"auth_type": "api_key_header", "api_key": "test_key"}',
+ schema="{}",
+ schema_type_str="openapi",
+ tools_str="[]",
)
elif provider_type == "builtin":
provider = BuiltinToolProvider(
name=fake.company(),
- description=fake.text(max_nb_chars=100),
- icon="🔧",
- icon_dark="🔧",
tenant_id="test_tenant_id",
+ user_id="test_user_id",
provider="test_provider",
credential_type="api_key",
- credentials={"api_key": "test_key"},
+ encrypted_credentials='{"api_key": "test_key"}',
)
elif provider_type == "workflow":
provider = WorkflowToolProvider(
name=fake.company(),
description=fake.text(max_nb_chars=100),
icon='{"background": "#FF6B6B", "content": "🔧"}',
- icon_dark='{"background": "#252525", "content": "🔧"}',
tenant_id="test_tenant_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":
provider = MCPToolProvider(
name=fake.company(),
- description=fake.text(max_nb_chars=100),
- provider_icon='{"background": "#FF6B6B", "content": "🔧"}',
+ icon='{"background": "#FF6B6B", "content": "🔧"}',
tenant_id="test_tenant_id",
user_id="test_user_id",
server_url="https://mcp.example.com",
+ server_url_hash="test_server_url_hash",
server_identifier="test_server",
tools='[{"name": "test_tool", "description": "Test tool"}]',
authed=True,