Refactor cache service and fix async issues (#1512)

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-03-09 22:55:56 -03:00 committed by GitHub
commit 67bccdc753
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 466 additions and 171 deletions

View file

@ -1,8 +1,9 @@
import json
from langflow.graph import Graph
import pytest
from langflow.graph import Graph
def get_graph(_type="basic"):
"""Get a graph from a json file"""
@ -38,7 +39,8 @@ def langchain_objects_are_equal(obj1, obj2):
# Test build_graph
def test_build_graph(client, basic_data_graph):
@pytest.mark.asyncio
async def test_build_graph(client, basic_data_graph):
graph = Graph.from_payload(basic_data_graph)
assert graph is not None
assert len(graph.vertices) == len(basic_data_graph["nodes"])