test: 添加 API 与核心验证流程测试套件#78
Merged
Merged
Conversation
- 使用 pytest + httpx 覆盖 /、/success、/verify 各分支 - 增加 TemplateResponse 签名回归测试,防止 Starlette API 变更导致 500 - 新增 requirements-dev.txt 与 GitHub Actions test 工作流 Co-authored-by: pplulee <hi@pplulee.me>
覆盖 POST /api/v1/verify 成功/失败分支、API 类型加群逻辑、 verification-status、captcha-config 及 get_client_ip 辅助函数。 Co-authored-by: pplulee <hi@pplulee.me>
Co-authored-by: pplulee <hi@pplulee.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
将测试相关改动合并到
dev分支,与已合并到main的 Starlette 修复分离,便于在开发分支上持续迭代测试。包含内容
requirements-dev.txt、pytest.ini、tests/(24 个用例)POST /api/v1/verify、health、captcha-config 等测试.github/workflows/test.ymlCI 工作流CI 触发规则
main、dev本地运行