Skip to content

The agent that grows with you

fix(tests): update two more append_message.call_args assertions to append_messages_batch

kshitij5bff3984bebe
diff --git a/tests/agent/test_verification_stop_caching.py b/tests/agent/test_verification_stop_caching.py
index 7620d9eb517..83bde23206e 100644
--- a/tests/agent/test_verification_stop_caching.py
+++ b/tests/agent/test_verification_stop_caching.py
@@ -84,8 +84,9 @@ def test_db_flush_drops_only_nudge_keeps_candidate(tmp_path, monkeypatch):
agent._flush_messages_to_session_db(messages, conversation_history=[])
persisted = [
- kwargs.get("content")
- for _args, kwargs in agent._session_db.append_message.call_args_list
+ msg.get("content")
+ for _args, kwargs in agent._session_db.append_messages_batch.call_args_list
+ for msg in kwargs["messages"]
]
assert "hi" in persisted
assert "verified and clean" in persisted
diff --git a/tests/test_tui_gateway_server.py b/tests/test_tui_gateway_server.py
index df245ad8738..18dae86177d 100644
--- a/tests/test_tui_gateway_server.py
+++ b/tests/test_tui_gateway_server.py
@@ -16063,7 +16063,7 @@ def test_native_vision_turn_persists_a_renderable_image_ref(tmp_path):
agent._flush_messages_to_session_db([{"role": "user", "content": native_parts}], [])
- written = agent._session_db.append_message.call_args.kwargs["content"]
+ written = agent._session_db.append_messages_batch.call_args.kwargs["messages"][0]["content"]
assert f"@image:`{img}`" in written
assert "what is in this photo?" in written
# The model keeps the pixels for the rest of the session.