"""Pytest configuration and fixtures."""

from __future__ import annotations

import pytest
from fastapi.testclient import TestClient


@pytest.fixture
def client():
    """Create a test client for the API."""
    # Import here to avoid issues if models aren't generated yet
    try:
        from {{ project_name_snake }}.main import app
        return TestClient(app)
    except ImportError:
        pytest.skip("App not ready - run 'prism generate' first")
