I was moving Wingman's last basic API checks into the regular backend test run. The old suite initialised the configured database even for GET / and GET /health. It also had Markdown and Unicode cases that passed as soon as the create endpoint returned a success status.1
For root and health, I mocked Slack authentication at import and database initialisation at startup. The tests still send requests through FastAPI's TestClient and check the response bodies. Root has to report the configured app name and version, and health has to return {"status":"healthy"}.
The document test keeps a real SQLite database. It creates a document with a Unicode title and Markdown body, checks the exact text sent to the mocked indexer, then fetches the document and compares the body again. That catches a change to the text at either boundary even if the create request still returns 200.1