feat: new tests for endpoints
This commit is contained in:
parent
d93ecee876
commit
287ef0d4e4
3 changed files with 36 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue