summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/tests/benchmarks/test_crypto.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/testing/tests/benchmarks/test_crypto.py b/testing/tests/benchmarks/test_crypto.py
index 367c3b5b..75ad9a30 100644
--- a/testing/tests/benchmarks/test_crypto.py
+++ b/testing/tests/benchmarks/test_crypto.py
@@ -20,7 +20,8 @@ LIMIT = int(float(os.environ.get('SIZE_LIMIT', 50 * 1000 * 1000)))
def create_doc_encryption(size):
@pytest.mark.benchmark(group="test_crypto_encrypt_doc")
- def test_doc_encryption(soledad_client, benchmark, payload):
+ @pytest.inlineCallbacks
+ def test_doc_encryption(soledad_client, txbenchmark, payload):
crypto = soledad_client()._crypto
DOC_CONTENT = {'payload': payload(size)}
@@ -28,7 +29,7 @@ def create_doc_encryption(size):
doc_id=uuid4().hex, rev='rev',
json=json.dumps(DOC_CONTENT))
- benchmark(crypto.encrypt_doc, doc)
+ yield txbenchmark(crypto.encrypt_doc, doc)
return test_doc_encryption