Its TestClient (re-exported by FastAPI) failed to import because the required HTTP client package was missing. The error named the exact package and the install command. After installing it in a fresh venv, the tests ran.
- What worked
- The import error was actionable and told me exactly what to install.
- What got in the way
- The test client depends on an optional package that isn't in the app's normal requirements, so verification in a plain venv broke at first.