mirror of
https://github.com/langgenius/dify.git
synced 2026-08-27 03:01:54 -04:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -457,9 +457,7 @@ def test_output_preview_for_file_renders_signed_url(seeded_run, fake_app_model):
|
||||
select(WorkflowNodeExecutionModel).where(WorkflowNodeExecutionModel.id == agent_execution.id)
|
||||
)
|
||||
assert row is not None
|
||||
row.outputs = json.dumps(
|
||||
{"report": {"file_id": "550e8400-e29b-41d4-a716-446655440000", "filename": "x.pdf"}}
|
||||
)
|
||||
row.outputs = json.dumps({"report": {"file_id": "550e8400-e29b-41d4-a716-446655440000", "filename": "x.pdf"}})
|
||||
session.commit()
|
||||
|
||||
service = NodeOutputInspectorService(binding_resolver=_stub_resolver([{"name": "report", "type": "file"}]))
|
||||
|
||||
@@ -4438,9 +4438,7 @@ def test_composer_validator_rejects_stage_4_declared_output_violations():
|
||||
)
|
||||
|
||||
with pytest.raises(InvalidComposerConfigError, match="reserved"):
|
||||
ComposerConfigValidator.validate_node_job_dict(
|
||||
{"declared_outputs": [{"name": "text", "type": "string"}]}
|
||||
)
|
||||
ComposerConfigValidator.validate_node_job_dict({"declared_outputs": [{"name": "text", "type": "string"}]})
|
||||
|
||||
ComposerConfigValidator.validate_node_job_dict(
|
||||
{
|
||||
|
||||
@@ -489,9 +489,7 @@ def test_file_output_preview_includes_signed_url(session_for: SessionFor) -> Non
|
||||
return_value="https://signed.example/x.pdf",
|
||||
):
|
||||
snapshot = service.snapshot_workflow_run(app_model=_app_model(), workflow_run_id="run-1", session=session)
|
||||
preview_value = next(
|
||||
output.value_preview for output in snapshot.node_outputs[0].outputs if output.name == "report"
|
||||
)
|
||||
preview_value = next(output.value_preview for output in snapshot.node_outputs[0].outputs if output.name == "report")
|
||||
assert isinstance(preview_value, dict)
|
||||
assert preview_value["preview_url"] == "https://signed.example/x.pdf"
|
||||
assert preview_value["reference"] == file_payload["reference"]
|
||||
@@ -628,9 +626,7 @@ def test_file_output_preview_uses_none_when_signed_url_resolution_fails(session_
|
||||
):
|
||||
snapshot = service.snapshot_workflow_run(app_model=_app_model(), workflow_run_id="run-1", session=session)
|
||||
|
||||
preview_value = next(
|
||||
output.value_preview for output in snapshot.node_outputs[0].outputs if output.name == "report"
|
||||
)
|
||||
preview_value = next(output.value_preview for output in snapshot.node_outputs[0].outputs if output.name == "report")
|
||||
assert isinstance(preview_value, dict)
|
||||
assert preview_value["preview_url"] is None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user