refactor: add fixtures for client in test files to speed them up (#3490)
refactor: Add fixtures for client in test files to speed them up
This commit is contained in:
parent
091baf7f33
commit
6d048b2d2c
9 changed files with 44 additions and 50 deletions
|
|
@ -5,7 +5,11 @@ from langflow.initial_setup.setup import load_starter_projects
|
|||
from langflow.load import load_flow_from_json
|
||||
|
||||
|
||||
@pytest.mark.noclient
|
||||
@pytest.fixture
|
||||
def client():
|
||||
pass
|
||||
|
||||
|
||||
def test_load_flow_from_json():
|
||||
"""Test loading a flow from a json file"""
|
||||
loaded = load_flow_from_json(pytest.BASIC_EXAMPLE_PATH)
|
||||
|
|
@ -13,7 +17,6 @@ def test_load_flow_from_json():
|
|||
assert isinstance(loaded, Graph)
|
||||
|
||||
|
||||
@pytest.mark.noclient
|
||||
def test_load_flow_from_json_with_tweaks():
|
||||
"""Test loading a flow from a json file and applying tweaks"""
|
||||
tweaks = {"dndnode_82": {"model_name": "gpt-3.5-turbo-16k-0613"}}
|
||||
|
|
@ -22,7 +25,6 @@ def test_load_flow_from_json_with_tweaks():
|
|||
assert isinstance(loaded, Graph)
|
||||
|
||||
|
||||
@pytest.mark.noclient
|
||||
def test_load_flow_from_json_object():
|
||||
"""Test loading a flow from a json file and applying tweaks"""
|
||||
_, projects = zip(*load_starter_projects())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue