from langchain_core.messages import HumanMessage

from app.agents.state import ConversationTurn, turn_to_message


def test_turn_to_message_returns_human_message_for_user_turn():
    turn = ConversationTurn(role='user', content='hello')

    message = turn_to_message(turn)

    assert isinstance(message, HumanMessage)
    assert message.content == 'hello'
