Initial certificate system

This commit is contained in:
nelso
2026-06-06 19:32:24 +08:00
commit ce4ed6213b
105 changed files with 9133 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
from app.services.captcha import make_captcha, verify_captcha
def test_captcha_can_only_be_used_once():
captcha = make_captcha()
captcha_id = captcha["captcha_id"]
# The real code is intentionally not exposed. This test locks in one-time consumption behavior.
assert not verify_captcha(captcha_id, "bad")
assert not verify_captcha(captcha_id, "bad")