5
5
from typing import TYPE_CHECKING
6
6
7
7
import httpx
8
- import requests
9
8
from integration_test_utils import random_resource_name
10
9
11
10
if TYPE_CHECKING :
@@ -27,13 +26,15 @@ def test_dataset_should_create_public_items_expiring_url_with_params(self, apify
27
26
assert 'limit=10' in items_public_url
28
27
assert 'offset=0' in items_public_url
29
28
30
- response = requests .get (items_public_url , timeout = 5 )
29
+ httpx_client = httpx .Client ()
30
+ response = httpx_client .get (items_public_url , timeout = 5 )
31
31
assert response .status_code == 200
32
32
33
33
time .sleep (3 )
34
34
35
35
# Assert that the request is now forbidden (expired signature)
36
- response_after_expiry = requests .get (items_public_url , timeout = 5 )
36
+ httpx_client = httpx .Client ()
37
+ response_after_expiry = httpx_client .get (items_public_url , timeout = 5 )
37
38
assert response_after_expiry .status_code == 403
38
39
39
40
dataset .delete ()
@@ -47,7 +48,8 @@ def test_dataset_should_create_public_items_non_expiring_url(self, apify_client:
47
48
48
49
assert 'signature=' in items_public_url
49
50
50
- response = requests .get (items_public_url , timeout = 5 )
51
+ httpx_client = httpx .Client ()
52
+ response = httpx_client .get (items_public_url , timeout = 5 )
51
53
assert response .status_code == 200
52
54
53
55
dataset .delete ()
0 commit comments