Fix import and function name in test_loading.py
This commit is contained in:
parent
a76f90157e
commit
a41ada87ee
1 changed files with 5 additions and 4 deletions
|
|
@ -1,9 +1,10 @@
|
||||||
import json
|
import json
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from langchain.chains.base import Chain
|
from langchain.chains.base import Chain
|
||||||
from langflow.processing.process import load_flow_from_json
|
|
||||||
from langflow.graph import Graph
|
from langflow.graph import Graph
|
||||||
from langflow.utils.payload import get_root_node
|
from langflow.processing.load import load_flow_from_json
|
||||||
|
from langflow.utils.payload import get_root_vertex
|
||||||
|
|
||||||
|
|
||||||
def test_load_flow_from_json():
|
def test_load_flow_from_json():
|
||||||
|
|
@ -22,14 +23,14 @@ def test_load_flow_from_json_with_tweaks():
|
||||||
assert loaded.llm.model_name == "gpt-3.5-turbo-16k-0613"
|
assert loaded.llm.model_name == "gpt-3.5-turbo-16k-0613"
|
||||||
|
|
||||||
|
|
||||||
def test_get_root_node():
|
def test_get_root_vertex():
|
||||||
with open(pytest.BASIC_EXAMPLE_PATH, "r") as f:
|
with open(pytest.BASIC_EXAMPLE_PATH, "r") as f:
|
||||||
flow_graph = json.load(f)
|
flow_graph = json.load(f)
|
||||||
data_graph = flow_graph["data"]
|
data_graph = flow_graph["data"]
|
||||||
nodes = data_graph["nodes"]
|
nodes = data_graph["nodes"]
|
||||||
edges = data_graph["edges"]
|
edges = data_graph["edges"]
|
||||||
graph = Graph(nodes, edges)
|
graph = Graph(nodes, edges)
|
||||||
root = get_root_node(graph)
|
root = get_root_vertex(graph)
|
||||||
assert root is not None
|
assert root is not None
|
||||||
assert hasattr(root, "id")
|
assert hasattr(root, "id")
|
||||||
assert hasattr(root, "data")
|
assert hasattr(root, "data")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue