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

🐛 Fix patch outputs #6114

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class NodePatch(InputSchemaWithoutCamelCase):
ge=0, le=100
) # NOTE: it is used by frontend for File Picker progress
boot_options: BootOptions = FieldNotRequired(alias="bootOptions")
outputs: dict[
str, Any
] = FieldNotRequired() # NOTE: it is used by frontend for File Picker
matusdrobuliak66 marked this conversation as resolved.
Show resolved Hide resolved


class NodeCreated(OutputSchema):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,21 @@ async def test_patch_project_node(
data=json.dumps(_patch_boot_options),
)
await assert_status(resp, expected)
# outputs
_patch_outputs = {
"outputs": {
"output_1": {
"store": 0,
"path": "9934cba6-4b51-11ef-968a-02420a00f1c1/571ffc8d-fa6e-411f-afc8-9c62d08dd2fa/matus.txt",
"eTag": "d41d8cd98f00b204e9800998ecf8427e",
}
}
}
resp = await client.patch(
f"{base_url}",
data=json.dumps(_patch_outputs),
)
await assert_status(resp, expected)

# Get project
get_url = client.app.router["get_project"].url_for(project_id=user_project["uuid"])
Expand All @@ -185,6 +200,7 @@ async def test_patch_project_node(
assert _tested_node["inputsRequired"] == _patch_inputs_required["inputsRequired"]
assert _tested_node["inputNodes"] == _patch_input_nodes["inputNodes"]
assert _tested_node["bootOptions"] == _patch_boot_options["bootOptions"]
assert _tested_node["outputs"] == _patch_outputs["outputs"]


@pytest.mark.parametrize(
Expand Down
Loading