Skip to content

Commit 3bf419e

Browse files
Update test to use _resolve_state() instead of removed _get_state_key()
Co-Authored-By: vincent@vellum.ai <0426vincent@gmail.com>
1 parent 2e7d361 commit 3bf419e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/vellum/workflows/triggers/tests/test_chat_message.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,14 @@ def test_chat_message_trigger__default_state():
163163
# GIVEN a ChatMessageTrigger with default config
164164
trigger = ChatMessageTrigger(message="Hello")
165165

166-
# THEN the default state is None (falls back to "chat_history")
166+
# AND a state with chat_history attribute
167+
state = ChatState()
168+
169+
# WHEN we resolve the state
170+
chat_history = trigger._resolve_state(state)
171+
172+
# THEN the default state config is None
167173
assert trigger.Config.state is None
168-
assert trigger._get_state_key() == "chat_history"
174+
175+
# AND the resolved chat history is the state's chat_history attribute
176+
assert chat_history is state.chat_history

0 commit comments

Comments
 (0)