File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff 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+ )
Original file line number Diff line number Diff 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- )
You can’t perform that action at this time.
0 commit comments