"""Test fixtures for the stock data API service.""" import os import pytest from fastapi.testclient import TestClient # Disable cache and API key for testing os.environ["CACHE_ENABLED"] = "false" os.environ["STOCK_DATA_API_KEY"] = "test-key" os.environ["DATABASE_URL"] = "sqlite:///./.cache/test.db" @pytest.fixture def client(): """Create a test client for the FastAPI app.""" from app.main import app return TestClient(app) @pytest.fixture def auth_headers(): """Return headers with valid API key.""" return {"X-API-Key": "test-key"}