test(tokens-repo): cleanup recovery tests

This commit is contained in:
Houkime 2023-01-09 12:54:10 +00:00 committed by Inex Code
parent 72fdd412d9
commit e5756a0dd1

View file

@ -5,9 +5,6 @@ import datetime
from tests.common import ( from tests.common import (
generate_api_query, generate_api_query,
mnemonic_to_hex,
read_json,
write_json,
assert_recovery_recent, assert_recovery_recent,
NearFuture, NearFuture,
RECOVERY_KEY_VALIDATION_DATETIME, RECOVERY_KEY_VALIDATION_DATETIME,
@ -203,6 +200,7 @@ def test_graphql_generate_recovery_key_with_expiration_in_the_past(
assert_errorcode(response, "getNewRecoveryApiKey", 400) assert_errorcode(response, "getNewRecoveryApiKey", 400)
assert response.json()["data"]["getNewRecoveryApiKey"]["key"] is None assert response.json()["data"]["getNewRecoveryApiKey"]["key"] is None
assert graphql_recovery_status(authorized_client)["exists"] is False
def test_graphql_generate_recovery_key_with_invalid_time_format( def test_graphql_generate_recovery_key_with_invalid_time_format(
@ -223,8 +221,7 @@ def test_graphql_generate_recovery_key_with_invalid_time_format(
}, },
) )
assert_empty(response) assert_empty(response)
assert graphql_recovery_status(authorized_client)["exists"] is False
assert "recovery_token" not in read_json(tokens_file)
def test_graphql_generate_recovery_key_with_limited_uses( def test_graphql_generate_recovery_key_with_limited_uses(
@ -276,3 +273,4 @@ def test_graphql_generate_recovery_key_with_zero_uses(authorized_client, tokens_
assert_errorcode(response, "getNewRecoveryApiKey", 400) assert_errorcode(response, "getNewRecoveryApiKey", 400)
assert response.json()["data"]["getNewRecoveryApiKey"]["key"] is None assert response.json()["data"]["getNewRecoveryApiKey"]["key"] is None
assert graphql_recovery_status(authorized_client)["exists"] is False