This commit is contained in:
Ivan Golikov 2025-01-03 15:32:01 +01:00
parent fbe40107be
commit f0be12394c
5 changed files with 18 additions and 10 deletions

View file

@ -1,13 +1,15 @@
from cryptography.fernet import Fernet, InvalidToken
import pytest
from pssecret_server.utils import encrypt_secret, decrypt_secret
from cryptography.fernet import Fernet, InvalidToken
from pssecret_server.utils import decrypt_secret, encrypt_secret
from ..factories import SecretFactory
def test_encrypte_secret_ok(fernet: Fernet):
secret = SecretFactory().build()
encrypted_secret = encrypt_secret(secret, fernet)
assert secret.data != encrypted_secret.data