crowncode-backend / tests /conftest.py
Rthur2003's picture
refactor: update test client fixture to use context manager for better resource management
36c6633
raw
history blame contribute delete
318 Bytes
"""Shared test fixtures for CrownCode backend tests."""
from __future__ import annotations
import pytest
from starlette.testclient import TestClient
from app.main import app
@pytest.fixture()
def client():
"""Create a test client for the FastAPI application."""
with TestClient(app) as c:
yield c