refac: implemented buid_json using graph methods

This commit is contained in:
Gabriel Almeida 2023-03-24 12:22:27 -03:00
commit 230f0d95e9
3 changed files with 28 additions and 15 deletions

View file

@ -17,14 +17,14 @@ def get_graph(basic=True):
return Graph(nodes, edges)
def test_get_connected_nodes():
def test_get_nodes_with_target():
"""Test getting connected nodes"""
graph = get_graph()
assert isinstance(graph, Graph)
# Get root node
root = get_root_node(graph)
assert root is not None
connected_nodes = graph.get_connected_nodes(root)
connected_nodes = graph.get_nodes_with_target(root)
assert connected_nodes is not None