Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify compatibility between WorkflowTaskV2.type_filters and TaskV2.input_types #2196

Prev Previous commit
Next Next commit
test replace endpoint
  • Loading branch information
ychiucco committed Jan 21, 2025
commit 68c9c842f3439197079667a42b7ba3f65b917830
13 changes: 13 additions & 0 deletions tests/v2/03_api/test_api_workflow_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ async def test_replace_task_in_workflowtask(
task_id=task1.id,
args_parallel={"wft1": "wft1"},
args_non_parallel={"wft1": "wft1"},
type_filters={"a": True},
)
wft2 = await workflowtask_factory_v2(
workflow_id=workflow.id,
Expand Down Expand Up @@ -909,3 +910,15 @@ async def test_replace_task_in_workflowtask(
)
assert res.status_code == 422
debug(res.json())

# test type filters compatibility
debug(wft1b)
task6 = await task_factory_v2(
user_id=user.id, input_types={"a": False}
)
res = await client.post(
f"{PREFIX}/project/{project.id}/workflow/{workflow.id}/wftask/"
f"replace-task/?workflow_task_id={wft1b['id']}&task_id={task6.id}",
)
assert res.status_code == 422
assert "filters" in res.json()["detail"]
Loading