Files
graphtest/tests/integration_tests/test_graph.py

13 lines
332 B
Python
Raw Normal View History

2024-09-13 16:28:17 -07:00
import pytest
2024-09-13 16:30:31 -07:00
from agent import graph
2024-09-13 16:57:34 -07:00
from langsmith import expect, unit
2024-09-13 16:28:17 -07:00
@pytest.mark.asyncio
@unit
2024-09-13 16:30:31 -07:00
async def test_agent_simple_passthrough() -> None:
2024-09-13 16:28:17 -07:00
res = await graph.ainvoke(
2024-09-13 16:57:34 -07:00
{"messages": [{"role": "user", "content": "What's 62 - 19?"}]}
2024-09-13 16:28:17 -07:00
)
2024-09-13 16:57:34 -07:00
expect(res["messages"][-1]["content"][0]["text"]).to_contain("43")