fix: restore receipt endpoint request injection test#45
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31fd802a93
ℹ️ 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".
|
|
||
| @_app.get("/api/receipt/{job_id}") | ||
| def _get_receipt(job_id: str, token: str = "", request: Request = None): | ||
| def _get_receipt(request: Request, job_id: str, token: str = ""): |
There was a problem hiding this comment.
Keep valid-token test off the localhost bypass
With this new injected Request, the TestClient request is now classified as local by the helper's localhost whitelist, so test_valid_token_grants_access no longer exercises verify_delivery_token at all; the test would pass with an invalid token as long as the job exists. Please force that test through a non-local client host or otherwise make is_local false so it still covers token-gated receipt access.
Useful? React with 👍 / 👎.
Summary
Test Plan