File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33from __future__ import annotations
44
5+ import os
56from collections .abc import AsyncGenerator
67from unittest .mock import AsyncMock , Mock
78
89import pytest
910from fastapi .testclient import TestClient
1011
12+ # Ensure settings can initialize in CI even when no .env is provided.
13+ os .environ .setdefault ("DATABASE_URL_ASYNC" , "postgresql+asyncpg://test:test@localhost:5432/test" )
14+ os .environ .setdefault ("DATABASE_URL_SYNC" , "postgresql://test:test@localhost:5432/test" )
15+ os .environ .setdefault ("REDIS_URL" , "redis://localhost:6379/0" )
16+ os .environ .setdefault ("SECRET_KEY" , "test-secret-key" )
17+ os .environ .setdefault ("ALGORITHM" , "HS256" )
18+ os .environ .setdefault ("ACCESS_TOKEN_EXPIRE_MINUTES" , "60" )
19+ os .environ .setdefault ("EMBEDDING_MODEL" , "all-MiniLM-L6-v2" )
20+ os .environ .setdefault ("CHUNK_SIZE" , "1000" )
21+ os .environ .setdefault ("CHUNK_OVERLAP" , "200" )
22+ os .environ .setdefault ("ENCODING" , "utf-8" )
23+
1124from app .agent .tools import vector_search
1225from app .main import app
1326
You can’t perform that action at this time.
0 commit comments