@@ -237,32 +237,32 @@ def ldai_client(client: LDClient) -> LDAIClient:
237237def test_agent_graph_method (ldai_client : LDAIClient ):
238238 graph = ldai_client .agent_graph ("test-agent-graph" , Context .create ("user-key" ))
239239
240- assert graph [ " enabled" ] is True
241- assert graph [ "graph" ] is not None
242- assert graph [ "graph" ] .root () is not None
243- assert graph [ "graph" ] .root ().get_key () == "customer-support-agent"
244- assert len (graph [ "graph" ] .get_child_nodes ("customer-support-agent" )) == 3
245- assert len (graph [ "graph" ] .get_child_nodes ("personalized-agent" )) == 0
246- assert len (graph [ "graph" ] .get_child_nodes ("multi-context-agent" )) == 0
247- assert len (graph [ "graph" ] .get_child_nodes ("minimal-agent" )) == 0
240+ assert graph . enabled is True
241+ assert graph is not None
242+ assert graph .root () is not None
243+ assert graph .root ().get_key () == "customer-support-agent"
244+ assert len (graph .get_child_nodes ("customer-support-agent" )) == 3
245+ assert len (graph .get_child_nodes ("personalized-agent" )) == 0
246+ assert len (graph .get_child_nodes ("multi-context-agent" )) == 0
247+ assert len (graph .get_child_nodes ("minimal-agent" )) == 0
248248
249249
250250def test_agent_graph_method_disabled_agent (ldai_client : LDAIClient ):
251251 graph = ldai_client .agent_graph (
252252 "test-agent-graph-disabled-agent" , Context .create ("user-key" )
253253 )
254254
255- assert graph [ " enabled" ] is False
256- assert graph [ "graph" ] is None
255+ assert graph . enabled is False
256+ assert graph . root () is None
257257
258258
259259def test_agent_graph_method_no_root_key (ldai_client : LDAIClient ):
260260 graph = ldai_client .agent_graph (
261261 "test-agent-graph-no-root-key" , Context .create ("user-key" )
262262 )
263263
264- assert graph [ " enabled" ] is False
265- assert graph [ "graph" ] is None
264+ assert graph . enabled is False
265+ assert graph . root () is None
266266
267267
268268def test_agent_graph_build_nodes (ldai_client : LDAIClient ):
@@ -319,9 +319,7 @@ def test_agent_graph_build_nodes(ldai_client: LDAIClient):
319319
320320
321321def test_agent_graph_get_methods (ldai_client : LDAIClient ):
322- graph = ldai_client .agent_graph ("test-agent-graph" , Context .create ("user-key" ))[
323- "graph"
324- ]
322+ graph = ldai_client .agent_graph ("test-agent-graph" , Context .create ("user-key" ))
325323
326324 assert graph .root () is not None
327325 assert graph .root ().get_key () == "customer-support-agent"
@@ -359,7 +357,7 @@ def test_agent_graph_get_methods(ldai_client: LDAIClient):
359357def test_agent_graph_traverse (ldai_client : LDAIClient ):
360358 graph = ldai_client .agent_graph (
361359 "test-agent-graph-depth-3" , Context .create ("user-key" )
362- )[ "graph" ]
360+ )
363361
364362 context = {}
365363 order = []
@@ -387,7 +385,7 @@ def handle_traverse(node, context):
387385def test_agent_graph_reverse_traverse (ldai_client : LDAIClient ):
388386 graph = ldai_client .agent_graph (
389387 "test-agent-graph-depth-3" , Context .create ("user-key" )
390- )[ "graph" ]
388+ )
391389
392390 context = {}
393391 order = []
@@ -414,7 +412,7 @@ def handle_reverse_traverse(node, context):
414412def test_agent_graph_handoff (ldai_client : LDAIClient ):
415413 graph = ldai_client .agent_graph (
416414 "test-agent-graph-depth-3" , Context .create ("user-key" )
417- )[ "graph" ]
415+ )
418416
419417 context = {}
420418
0 commit comments