Add fallback to environment variables in loading test (#1961)

chore: Update loading test to include fallback to environment variables
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-05-23 13:19:15 -07:00 committed by GitHub
commit b98f69aa98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 9451 additions and 8587 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

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