Skip to content

Commit

Permalink
test replace endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ychiucco committed Jan 21, 2025
1 parent d2566e0 commit 68c9c84
Showing 1 changed file with 13 additions and 0 deletions.
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"]

0 comments on commit 68c9c84

Please sign in to comment.