feat: new tests for endpoints

This commit is contained in:
Gabriel Almeida 2023-03-26 21:02:45 -03:00
commit 287ef0d4e4
3 changed files with 36 additions and 2 deletions

View file

@ -1,5 +1,6 @@
from pathlib import Path
import pytest
from fastapi.testclient import TestClient
def pytest_configure():
@ -9,3 +10,14 @@ def pytest_configure():
pytest.COMPLEX_EXAMPLE_PATH = (
Path(__file__).parent.absolute() / "data" / "complex_example.json"
)
# Create client fixture for FastAPI
@pytest.fixture(scope="module")
def client():
from langflow.main import create_app
app = create_app()
with TestClient(app) as client:
yield client