Skip to content

Commit 01967b6

Browse files
Add assertion to verify state_variable_id matches state_variables
Co-Authored-By: [email protected] <[email protected]>
1 parent fcbdbc5 commit 01967b6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ee/vellum_ee/workflows/display/tests/workflow_serialization/test_chat_message_trigger_custom_state_serialization.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,8 @@ def test_custom_state_workflow_serialization():
6262
},
6363
}
6464
]
65+
66+
# AND the state_variable_id should match the corresponding state variable
67+
state_variable_id = serialized_workflow["triggers"][0]["exec_config"]["state"]["state_variable_id"]
68+
state_variable_ids = [sv["id"] for sv in serialized_workflow["state_variables"]]
69+
assert state_variable_id in state_variable_ids

0 commit comments

Comments
 (0)