mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-22 18:06:45 +00:00
[AZ-154] [AZ-157] [AZ-159] [AZ-160] Add augmentation nonfunc, encryption, annotation class, hardware hash tests
Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import os
|
||||
import time
|
||||
|
||||
import pytest
|
||||
|
||||
from security import Security
|
||||
|
||||
|
||||
@pytest.mark.performance
|
||||
def test_pt_enc_01_encrypt_decrypt_10mb_within_five_seconds():
|
||||
key = "test-key"
|
||||
data = os.urandom(10 * 1024 * 1024)
|
||||
t0 = time.perf_counter()
|
||||
enc = Security.encrypt_to(data, key)
|
||||
out = Security.decrypt_to(enc, key)
|
||||
elapsed = time.perf_counter() - t0
|
||||
assert elapsed <= 5.0
|
||||
assert out == data
|
||||
Reference in New Issue
Block a user