Skip to content

test: 添加 API 与核心验证流程测试套件#78

Merged
cursor[bot] merged 3 commits into
devfrom
cursor/add-api-tests-dev-8585
May 19, 2026
Merged

test: 添加 API 与核心验证流程测试套件#78
cursor[bot] merged 3 commits into
devfrom
cursor/add-api-tests-dev-8585

Conversation

@pplulee
Copy link
Copy Markdown
Member

@pplulee pplulee commented May 19, 2026

概述

将测试相关改动合并到 dev 分支,与已合并到 main 的 Starlette 修复分离,便于在开发分支上持续迭代测试。

包含内容

  • requirements-dev.txtpytest.initests/(24 个用例)
  • 模板页面、POST /api/v1/verify、health、captcha-config 等测试
  • .github/workflows/test.yml CI 工作流

CI 触发规则

  • pushmaindev
  • 所有 pull_request(不限目标分支)

本地运行

pip install -r requirements-dev.txt
Copy-Item config.example.toml config.toml
pytest -v
Open in Web Open in Cursor 

cursoragent and others added 3 commits May 19, 2026 05:42
- 使用 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>
@cursor cursor Bot merged commit fe55a79 into dev May 19, 2026
1 check passed
@pplulee pplulee deleted the cursor/add-api-tests-dev-8585 branch May 19, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants