Initial certificate system
This commit is contained in:
9
backend/tests/test_captcha.py
Normal file
9
backend/tests/test_captcha.py
Normal 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")
|
||||
Reference in New Issue
Block a user