feat: implement data layer with comprehensive test infrastructure
- Define SQLModel schemas for Session, Note, and Link entities - Add API request/response models for RPC endpoints - Create LLM structured output models for Zettel extraction - Set up async database initialization with SQLModel and aiosqlite - Implement repository pattern for CRUD operations - Add complete test suite with pytest configuration - Create validation test runner for development workflow - Add .gitignore for Python/FastAPI project security
This commit is contained in:
24
tests/test_config.py
Normal file
24
tests/test_config.py
Normal file
@@ -0,0 +1,24 @@
|
||||
"""Test configuration and environment setup."""
|
||||
import pytest
|
||||
from app.core.config import settings
|
||||
|
||||
|
||||
def test_config_loads():
|
||||
"""Test that configuration loads successfully."""
|
||||
assert settings.GOOGLE_API_KEY is not None
|
||||
assert settings.DATABASE_URL.startswith("sqlite+aiosqlite://")
|
||||
assert settings.CHROMA_PERSIST_DIR == "./chroma_db"
|
||||
|
||||
|
||||
def test_model_names():
|
||||
"""Test that model names are configured correctly."""
|
||||
assert "gemini" in settings.LLM_FLASH_MODEL.lower()
|
||||
assert "gemini" in settings.LLM_PRO_MODEL.lower()
|
||||
assert "embedding" in settings.EMBEDDING_MODEL.lower()
|
||||
|
||||
|
||||
def test_api_settings():
|
||||
"""Test API configuration."""
|
||||
assert isinstance(settings.API_PORT, int)
|
||||
assert settings.API_PORT > 0
|
||||
assert settings.API_HOST is not None
|
||||
Reference in New Issue
Block a user