10 lines
372 B
Python
10 lines
372 B
Python
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")
|