Skip to content

Commit 3fba6d0

Browse files
committed
Fix integration tests
1 parent 26d64c3 commit 3fba6d0

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/integration/endpoints/test_query_v2_integration.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ def mock_llama_stack_client_fixture(
8181
mock_vector_stores_response.data = []
8282
mock_client.vector_stores.list.return_value = mock_vector_stores_response
8383

84+
# Mock conversations.create for new conversation creation
85+
# Returns ID in llama-stack format (conv_ prefix + 48 hex chars)
86+
mock_conversation = mocker.MagicMock()
87+
mock_conversation.id = "conv_" + "a" * 48 # conv_aaa...aaa (proper format)
88+
mock_client.conversations.create = mocker.AsyncMock(return_value=mock_conversation)
89+
8490
# Mock version info
8591
mock_client.inspect.version.return_value = VersionInfo(version="0.2.22")
8692

@@ -159,7 +165,8 @@ async def test_query_v2_endpoint_successful_response(
159165

160166
# Verify response structure
161167
assert response.conversation_id is not None
162-
assert response.conversation_id == "response-123"
168+
# Conversation ID is normalized (without conv_ prefix) from conversations.create()
169+
assert response.conversation_id == "a" * 48
163170
assert "Ansible" in response.response
164171
assert response.response == "This is a test response about Ansible."
165172
assert response.input_tokens >= 0

0 commit comments

Comments
 (0)