MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_add_user_message

Function test_add_user_message

tests/chat/test_chat_context.py:230–237  ·  view source on GitHub ↗

Test add_user_message.

(chat_context)

Source from the content-addressed store, hash-verified

228
229@pytest.mark.asyncio
230async def test_add_user_message(chat_context):
231 """Test add_user_message."""
232 await chat_context.initialize()
233 initial_len = len(chat_context.conversation_history)
234 await chat_context.add_user_message("Hello!")
235 assert len(chat_context.conversation_history) == initial_len + 1
236 assert chat_context.conversation_history[-1].content == "Hello!"
237 assert chat_context.conversation_history[-1].role.value == "user"
238
239
240@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 2

initializeMethod · 0.45
add_user_messageMethod · 0.45

Tested by

no test coverage detected