mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 01:21:48 +03:00
21 lines
408 B
Python
21 lines
408 B
Python
import os
|
|
|
|
import pytest
|
|
from fastapi.testclient import TestClient
|
|
from main import app
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def client():
|
|
return TestClient(app)
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def api_key():
|
|
API_KEY = os.getenv("CI_TEST_API_KEY")
|
|
if not API_KEY:
|
|
raise ValueError(
|
|
"CI_TEST_API_KEY environment variable not set. Cannot run tests."
|
|
)
|
|
return API_KEY
|