Add missing EncryptedBlob tests

This commit is contained in:
Sergi Delgado Segura
2019-11-18 15:25:15 +00:00
parent 6ff580ed8f
commit a1c0eeadbc

View File

@@ -11,6 +11,24 @@ def test_init_encrypted_blob():
assert EncryptedBlob(data).data == data
def test_init_encrypted_blob_wrong_cipher():
try:
EncryptedBlob(get_random_value_hex(64), cipher="")
assert False
except ValueError:
assert True
def test_init_encrypted_blob_wrong_hash_function():
try:
EncryptedBlob(get_random_value_hex(64), hash_function="")
assert False
except ValueError:
assert True
def test_equal():
data = get_random_value_hex(64)
e_blob1 = EncryptedBlob(data)