From 0c639bd75157ed211682ad0676f68f9c6b26952a Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 22 Aug 2023 10:26:11 +1000 Subject: [PATCH] fix(tests): fix tests --- tests/nodes/test_graph_execution_state.py | 4 ++-- tests/nodes/test_node_graph.py | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/nodes/test_graph_execution_state.py b/tests/nodes/test_graph_execution_state.py index cc3cc0288b..cdb9815f83 100644 --- a/tests/nodes/test_graph_execution_state.py +++ b/tests/nodes/test_graph_execution_state.py @@ -116,14 +116,14 @@ def test_graph_state_expands_iterator(mock_services): graph.add_node(AddInvocation(id="3", b=1)) graph.add_edge(create_edge("0", "collection", "1", "collection")) graph.add_edge(create_edge("1", "item", "2", "a")) - graph.add_edge(create_edge("2", "a", "3", "a")) + graph.add_edge(create_edge("2", "value", "3", "a")) g = GraphExecutionState(graph=graph) while not g.is_complete(): invoke_next(g, mock_services) prepared_add_nodes = g.source_prepared_mapping["3"] - results = set([g.results[n].a for n in prepared_add_nodes]) + results = set([g.results[n].value for n in prepared_add_nodes]) expected = set([1, 11, 21]) assert results == expected diff --git a/tests/nodes/test_node_graph.py b/tests/nodes/test_node_graph.py index f03e23e1c2..fe6709827f 100644 --- a/tests/nodes/test_node_graph.py +++ b/tests/nodes/test_node_graph.py @@ -477,13 +477,13 @@ def test_graph_expands_subgraph(): n1_2 = SubtractInvocation(id="2", b=3) n1.graph.add_node(n1_1) n1.graph.add_node(n1_2) - n1.graph.add_edge(create_edge("1", "a", "2", "a")) + n1.graph.add_edge(create_edge("1", "value", "2", "a")) g.add_node(n1) n2 = AddInvocation(id="2", b=5) g.add_node(n2) - g.add_edge(create_edge("1.2", "a", "2", "a")) + g.add_edge(create_edge("1.2", "value", "2", "a")) dg = g.nx_graph_flat() assert set(dg.nodes) == set(["1.1", "1.2", "2"]) @@ -500,14 +500,14 @@ def test_graph_subgraph_t2i(): g.add_node(n1) - n2 = IntegerInvocation(id="2", a=512) - n3 = IntegerInvocation(id="3", a=256) + n2 = IntegerInvocation(id="2", value=512) + n3 = IntegerInvocation(id="3", value=256) g.add_node(n2) g.add_node(n3) - g.add_edge(create_edge("2", "a", "1.width", "a")) - g.add_edge(create_edge("3", "a", "1.height", "a")) + g.add_edge(create_edge("2", "value", "1.width", "value")) + g.add_edge(create_edge("3", "value", "1.height", "value")) n4 = ShowImageInvocation(id="4") g.add_node(n4)