File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
libs/langgraph-checkpoint-mongodb/tests/integration_tests Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ class JokeState(JokeInput, JokeOutput): ...
5858def 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" )
You can’t perform that action at this time.
0 commit comments