Merge the two delivery test api (vibe-kanban 7e7941e4)

The AdvancedChatDraftHumanInputDeliveryTestApi and WorkflowDraftHumanInputDeliveryTestApi are the same. Merge this two api by deleting AdvancedChatDraftHumanInputDeliveryTestApi and allowing

Chatflow to use WorkflowDraftHumanInputDeliveryTestApi.

Update tests accordingly. This project uses uv to manage dependencies.
This commit is contained in:
QuantumGhost
2026-01-16 14:06:32 +08:00
parent 68d56415d0
commit 1f47ea8452
2 changed files with 5 additions and 35 deletions

View File

@ -160,8 +160,8 @@ class DeliveryTestCase:
"case",
[
DeliveryTestCase(
resource_cls=workflow_module.AdvancedChatDraftHumanInputDeliveryTestApi,
path="/console/api/apps/app-123/advanced-chat/workflows/draft/human-input/nodes/node-7/delivery-test",
resource_cls=workflow_module.WorkflowDraftHumanInputDeliveryTestApi,
path="/console/api/apps/app-123/workflows/draft/human-input/nodes/node-7/delivery-test",
mode=AppMode.ADVANCED_CHAT,
),
DeliveryTestCase(
@ -207,12 +207,12 @@ def test_human_input_delivery_test_maps_validation_error(app: Flask, monkeypatch
monkeypatch.setattr(workflow_module, "WorkflowService", MagicMock(return_value=service_instance))
with app.test_request_context(
"/console/api/apps/app-123/advanced-chat/workflows/draft/human-input/nodes/node-1/delivery-test",
"/console/api/apps/app-123/workflows/draft/human-input/nodes/node-1/delivery-test",
method="POST",
json={"delivery_method_id": "bad"},
):
with pytest.raises(InvalidArgumentError):
workflow_module.AdvancedChatDraftHumanInputDeliveryTestApi().post(app_id=app_model.id, node_id="node-1")
workflow_module.WorkflowDraftHumanInputDeliveryTestApi().post(app_id=app_model.id, node_id="node-1")
def test_human_input_preview_rejects_non_mapping(app: Flask, monkeypatch: pytest.MonkeyPatch) -> None: