import pytest from fastapi.testclient import TestClient from app.main import create_app @pytest.fixture def client(): """Fresh app (and therefore a fresh, empty BookStore) per test.""" with TestClient(create_app()) as c: yield c