Split one unit test test_encrypt_decrypt_config__malformed into two, one for too short configuration, another one for corrupted file.

This commit is contained in:
VakarisZ 2021-06-07 11:43:44 +03:00
parent 04a35a1e36
commit abaeafcb6b
1 changed files with 4 additions and 1 deletions

View File

@ -36,9 +36,12 @@ def test_encrypt_decrypt_config__wrong_password(plaintext_config):
decrypt_config(encrypted_config, INCORRECT_PASSWORD)
def test_encrypt_decrypt_config__malformed():
def test_encrypt_decrypt_config__malformed_too_short():
with pytest.raises(ValueError):
decrypt_config(MALFORMED_CYPHER_TEXT_TOO_SHORT, PASSWORD)
def test_encrypt_decrypt_config__malformed_corrupted():
with pytest.raises(ValueError):
decrypt_config(MALFORMED_CYPHER_TEXT_CORRUPTED, PASSWORD)