Skip to content

Commit e5b2bc4

Browse files
committed
fix encrypted secrets test
1 parent 683cb31 commit e5b2bc4

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ dependencies = [
3737
"apify-client>=1.12.0",
3838
"apify-shared>=1.3.0",
3939
"cachetools>=5.5.0",
40-
"crawlee@git+https://github.com/apify/crawlee-python.git@master",
40+
"crawlee@git+https://github.com/apify/crawlee-python.git@0c4cfc9ada06e35f63213e6a937c4e85defcbecf",
4141
"cryptography>=42.0.0",
4242
"httpx>=0.27.0",
4343
# TODO: ensure compatibility with the latest version of lazy-object-proxy

tests/unit/actor/test_actor_key_value_store.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import pytest
44

55
from apify_shared.consts import ApifyEnvVars
6+
from crawlee._utils.file import json_dumps
67

78
from ..test_crypto import PRIVATE_KEY_PASSWORD, PRIVATE_KEY_PEM_BASE64, PUBLIC_KEY
89
from apify import Actor
@@ -69,9 +70,9 @@ async def test_get_input_with_encrypted_secrets(monkeypatch: pytest.MonkeyPatch)
6970
# and includes schemahash. We are testing both formats to ensure backward compatibility.
7071

7172
encrypted_string_legacy = public_encrypt(secret_string_legacy, public_key=PUBLIC_KEY)
72-
encrypted_string = public_encrypt(json_dumps(secret_string), public_key=PUBLIC_KEY)
73-
encrypted_object = public_encrypt(json_dumps(secret_object), public_key=PUBLIC_KEY)
74-
encrypted_array = public_encrypt(json_dumps(secret_array), public_key=PUBLIC_KEY)
73+
encrypted_string = public_encrypt(await json_dumps(secret_string), public_key=PUBLIC_KEY)
74+
encrypted_object = public_encrypt(await json_dumps(secret_object), public_key=PUBLIC_KEY)
75+
encrypted_array = public_encrypt(await json_dumps(secret_array), public_key=PUBLIC_KEY)
7576

7677
input_with_secret = {
7778
'foo': 'bar',

uv.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)