mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 22:24:23 +01:00
Moves EncryptedBlob to common
This commit is contained in:
18
test/common/unit/test_blob.py
Normal file
18
test/common/unit/test_blob.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from binascii import unhexlify
|
||||
|
||||
from common.blob import Blob
|
||||
from test.pisa.unit.conftest import get_random_value_hex
|
||||
|
||||
|
||||
def test_init_blob():
|
||||
data = get_random_value_hex(64)
|
||||
blob = Blob(data)
|
||||
assert isinstance(blob, Blob)
|
||||
|
||||
# Wrong data
|
||||
try:
|
||||
Blob(unhexlify(get_random_value_hex(64)))
|
||||
assert False, "Able to create blob with wrong data"
|
||||
|
||||
except ValueError:
|
||||
assert True
|
||||
Reference in New Issue
Block a user