import pytest from litestar.testing import TestClient from speech_collect.app import app @pytest.fixture def client(): return TestClient(app=app) def test_index_route(client): resp = client.get("/") assert resp.status_code == 200 assert resp.text == "Hello, world!" def test_get_book(client): resp = client.get("/books/1337") assert resp.status_code == 200 assert resp.json()["book_id"] == 1337