quivr/backend/core/tests/conftest.py
2023-07-17 07:57:27 +01:00

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