Skip to content

Commit 0eef654

Browse files
committed
Update test
1 parent 75c9ec7 commit 0eef654

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

tests/integration/test_actor_key_value_store.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,15 @@ async def main() -> None:
230230
run_result = await run_actor(actor)
231231

232232
assert run_result.status == 'SUCCEEDED'
233+
234+
235+
async def test_get_public_url(apify_token: str, monkeypatch: pytest.MonkeyPatch) -> None:
236+
test_key = 'test_key'
237+
monkeypatch.setenv(ApifyEnvVars.TOKEN, apify_token)
238+
239+
async with Actor:
240+
kvs = await Actor.open_key_value_store(force_cloud=True)
241+
public_url = await kvs.get_public_url(test_key)
242+
assert public_url.startswith(
243+
f'https://api.apify.com/v2/key-value-stores/{kvs.id}/records/{test_key}?signature='
244+
)

tests/unit/actor/test_actor_key_value_store.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,3 @@ async def test_get_input_with_encrypted_secrets(monkeypatch: pytest.MonkeyPatch)
106106
assert actor_input['secret_string'] == secret_string
107107
assert actor_input['secret_object'] == secret_object
108108
assert actor_input['secret_array'] == secret_array
109-
110-
111-
async def test_get_public_url() -> None:
112-
test_key = 'test_key'
113-
114-
async with Actor:
115-
kvs = await Actor.open_key_value_store(force_cloud=True)
116-
public_url = await kvs.get_public_url(test_key)
117-
assert public_url.startswith(
118-
f'https://api.apify.com/v2/key-value-stores/{kvs.id}/records/{test_key}?signature='
119-
)

0 commit comments

Comments
 (0)