mirror of
https://github.com/aljazceru/python-teos.git
synced 2026-02-23 15:34:18 +01:00
Add missing EncryptedBlob tests
This commit is contained in:
@@ -11,6 +11,24 @@ def test_init_encrypted_blob():
|
|||||||
assert EncryptedBlob(data).data == data
|
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():
|
def test_equal():
|
||||||
data = get_random_value_hex(64)
|
data = get_random_value_hex(64)
|
||||||
e_blob1 = EncryptedBlob(data)
|
e_blob1 = EncryptedBlob(data)
|
||||||
|
|||||||
Reference in New Issue
Block a user