feat(workers): Define WorkerState for the Data Analyst subgraph
This commit is contained in:
17
backend/tests/test_data_analyst_state.py
Normal file
17
backend/tests/test_data_analyst_state.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from typing import get_type_hints, List
|
||||
from langchain_core.messages import BaseMessage
|
||||
from ea_chatbot.graph.workers.data_analyst.state import WorkerState
|
||||
|
||||
def test_data_analyst_worker_state():
|
||||
"""Verify that DataAnalyst WorkerState has the required fields."""
|
||||
hints = get_type_hints(WorkerState)
|
||||
|
||||
assert "messages" in hints
|
||||
assert "task" in hints
|
||||
assert hints["task"] == str
|
||||
|
||||
assert "code" in hints
|
||||
assert "output" in hints
|
||||
assert "error" in hints
|
||||
assert "iterations" in hints
|
||||
assert hints["iterations"] == int
|
||||
Reference in New Issue
Block a user