Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 05ad02d284
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| def _endpoint(app, path: str): | ||
| for route in app.routes: | ||
| if route.path == path: | ||
| return route.endpoint |
There was a problem hiding this comment.
Use TestClient for endpoint behavior tests
Because this helper returns the raw route function by path, the new /commands test bypasses FastAPI's HTTP method routing, request parsing, and response serialization. In the scenario this endpoint is accidentally registered with the wrong method or its API request/response handling regresses, run_command(CommandRequest(...)) can still pass even though real clients cannot call the endpoint. Use TestClient(app).post('/commands', json=...) for this coverage so the test actually protects the API contract.
Useful? React with 👍 / 👎.
Summary
Tightens local command API coverage for Issue #44.
Changes
Closes #44.