mirror of
https://github.com/mCaptcha/cache.git
synced 2024-11-22 00:25:20 +03:00
tests: challenge names are different from key
This commit is contained in:
parent
a88527a0b5
commit
59bcf0f156
1 changed files with 4 additions and 4 deletions
|
@ -79,7 +79,7 @@ async def add_challenge_works():
|
|||
"""Test: Add Challenge"""
|
||||
try:
|
||||
key = "add_challenge"
|
||||
challenge_name = key
|
||||
challenge_name = "add_challenge_challenge"
|
||||
challenge = get_challenge(challenge_name)
|
||||
|
||||
add_challenge(key, challenge)
|
||||
|
@ -98,7 +98,7 @@ async def challenge_ttl_works():
|
|||
"""Test: Challenge TTL"""
|
||||
try:
|
||||
key = "ttl_challenge"
|
||||
challenge_name = key
|
||||
challenge_name = "ttl_challenge_challenge"
|
||||
challenge = get_challenge(challenge_name)
|
||||
|
||||
add_challenge(key, challenge)
|
||||
|
@ -116,7 +116,7 @@ async def challenge_doesnt_exist():
|
|||
"""Test: Non-existent Challenge"""
|
||||
try:
|
||||
challenge_name = "nonexistent_challenge"
|
||||
key = challenge_name
|
||||
key = "nonexistent_challenge_key"
|
||||
|
||||
error = get_challenge_from_redis(key, challenge_name)
|
||||
assert str(error) == CHALLENGE_NOT_FOUND
|
||||
|
@ -145,7 +145,7 @@ async def delete_challenge_works():
|
|||
"""Test: Delete Challenges"""
|
||||
try:
|
||||
challenge_name = "delete_challenge"
|
||||
key = challenge_name
|
||||
key = "delete_challenge_key"
|
||||
challenge = get_challenge(challenge_name)
|
||||
|
||||
add_challenge(key, challenge)
|
||||
|
|
Loading…
Reference in a new issue