Update langflow base prompts API utils (#1682)

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-04-11 12:47:31 -03:00 • committed by GitHub
commit 8fa8781a0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 99 additions and 97 deletions

View file

@ -1,4 +1,5 @@
import pytest
from langflow.graph import Graph
from langflow.graph.schema import RunOutputs
from langflow.initial_setup.setup import load_starter_projects
@ -36,7 +37,7 @@ def test_load_flow_from_json_object():
def test_run_flow_from_json_object():
"""Test loading a flow from a json file and applying tweaks"""
_, projects = zip(*load_starter_projects())
project = projects[0]
project = [project for project in projects if "Basic Prompting" in project["name"]][0]
results = run_flow_from_json(project, input_value="test")
assert results is not None
assert all(isinstance(result, RunOutputs) for result in results)