From 0b7a2c3a80d4962e418e00f78119470d3437980c Mon Sep 17 00:00:00 2001 From: Novice Date: Thu, 5 Mar 2026 16:12:01 +0800 Subject: [PATCH] chore(test): update description handling in WorkflowDraftVariable tests to ensure passthrough of values --- .../workflow/test_workflow_draft_variable_service.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api/tests/unit_tests/services/workflow/test_workflow_draft_variable_service.py b/api/tests/unit_tests/services/workflow/test_workflow_draft_variable_service.py index 43f89d5d2d..eed06fcbcf 100644 --- a/api/tests/unit_tests/services/workflow/test_workflow_draft_variable_service.py +++ b/api/tests/unit_tests/services/workflow/test_workflow_draft_variable_service.py @@ -501,16 +501,16 @@ class TestModelToInsertionDict: # is_default_value must always be present assert "is_default_value" in d - def test_description_truncated_to_255(self): - """Problem 2: StringDataRightTruncation — description longer than 255 - chars causes psycopg2 error on varchar(255) column. + def test_description_passthrough(self): + """_model_to_insertion_dict passes description as-is; + length validation is enforced earlier in build_conversation_variable_from_mapping. """ - long_desc = "a" * 500 + desc = "a" * 200 conv_var = WorkflowDraftVariable.new_conversation_variable( app_id="app-1", name="counter", value=StringSegment(value="0"), - description=long_desc, + description=desc, ) d = _model_to_insertion_dict(conv_var) - assert len(d["description"]) <= 255 + assert d["description"] == desc