Skip to content

Commit cd9774c

Browse files
committed
Fixes typo. Adds assertion.
1 parent 3642ab5 commit cd9774c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

libs/langgraph-checkpoint-mongodb/tests/integration_tests/test_highlevel_graph.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class JokeState(JokeInput, JokeOutput): ...
5858
def fanout_to_subgraph() -> StateGraph:
5959
# Subgraph nodes create a joke.
6060
def edit(state: JokeOutput) -> JokeOutput:
61-
return {"jokes": [f"{state['jokes'][0]}.a.. and cats!"]}
61+
return {"jokes": [f"{state['jokes'][0]}... and cats!"]}
6262

6363
def generate(state: JokeInput) -> JokeOutput:
6464
return {"jokes": [f"Joke about the year {state['subject']}"]}
@@ -168,5 +168,11 @@ async def test_fanout(
168168
assert isinstance(out[0], dict)
169169
assert out[0].keys() == {"generate_joke"}
170170
assert set(out[0]["generate_joke"].keys()) == {"jokes"}
171+
assert all(
172+
res["generate_joke"]["jokes"][0].endswith(
173+
f'{" and the year before" * 3}... and cats!'
174+
)
175+
for res in out
176+
)
171177
end = time.monotonic()
172178
print(f"{cname}: {end - start:.4f} seconds")

0 commit comments

Comments
 (0)