py-service-fastapi-bootstrap/tests/conftest.py
Lilith 9a50be55c8 refactor: rename lilith-fastapi-service-base → lilith-service-fastapi-bootstrap
Breaking change: Package renamed for consistency with TypeScript naming convention.

- Rename module: lilith_fastapi_service_base → lilith_service_fastapi_bootstrap
- Bump version: 2.3.0 → 3.0.0
- Update all imports and documentation

Migration: Change imports from `lilith_fastapi_service_base` to `lilith_service_fastapi_bootstrap`

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 11:18:03 -08:00

51 lines
1.2 KiB
Python

"""Pytest configuration for ml-service-base tests."""
import pytest
from httpx import AsyncClient, ASGITransport
from lilith_service_fastapi_bootstrap import create_ml_service, BaseServiceSettings, LifespanManager, HealthChecker
@pytest.fixture
def settings():
"""Create test settings."""
return BaseServiceSettings(
service_name="test-service",
service_version="1.0.0",
debug=True,
log_level="DEBUG",
)
@pytest.fixture
def lifespan_manager():
"""Create test lifespan manager."""
return LifespanManager()
@pytest.fixture
def health_checker():
"""Create test health checker."""
return HealthChecker()
@pytest.fixture
def app(settings, lifespan_manager, health_checker):
"""Create test FastAPI app."""
return create_ml_service(
title="Test Service",
description="Test ML service",
version="1.0.0",
settings=settings,
lifespan_manager=lifespan_manager,
health_checker=health_checker,
)
@pytest.fixture
async def client(app):
"""Create async test client."""
async with AsyncClient(
transport=ASGITransport(app=app),
base_url="http://test"
) as ac:
yield ac