File tree Expand file tree Collapse file tree 4 files changed +18
-17
lines changed Expand file tree Collapse file tree 4 files changed +18
-17
lines changed Original file line number Diff line number Diff line change 7
7
TOKEN_ENV_VAR = 'APIFY_TEST_USER_API_TOKEN'
8
8
API_URL_ENV_VAR = 'APIFY_INTEGRATION_TESTS_API_URL'
9
9
10
- parametrized_api_urls = pytest .mark .parametrize (
11
- ('api_url' , 'api_public_url' ),
12
- [
13
- ('https://api.apify.com' , 'https://api.apify.com' ),
14
- ('https://api.apify.com' , None ),
15
- ('https://api.apify.com' , 'https://custom-public-url.com' ),
16
- ('https://api.apify.com' , 'https://custom-public-url.com/with/custom/path' ),
17
- ('https://api.apify.com' , 'https://custom-public-url.com/with/custom/path/' ),
18
- ('http://10.0.88.214:8010' , 'https://api.apify.com' ),
19
- ('http://10.0.88.214:8010' , None ),
20
- ],
21
- )
22
-
23
10
24
11
@pytest .fixture
25
12
def api_token () -> str :
Original file line number Diff line number Diff line change 1
1
import secrets
2
2
import string
3
3
4
+ import pytest
5
+
4
6
5
7
def random_string (length : int = 10 ) -> str :
6
8
return '' .join (secrets .choice (string .ascii_letters ) for _ in range (length ))
7
9
8
10
9
11
def random_resource_name (resource : str ) -> str :
10
12
return f'python-client-test-{ resource } -{ random_string (5 )} '
13
+
14
+
15
+ parametrized_api_urls = pytest .mark .parametrize (
16
+ ('api_url' , 'api_public_url' ),
17
+ [
18
+ ('https://api.apify.com' , 'https://api.apify.com' ),
19
+ ('https://api.apify.com' , None ),
20
+ ('https://api.apify.com' , 'https://custom-public-url.com' ),
21
+ ('https://api.apify.com' , 'https://custom-public-url.com/with/custom/path' ),
22
+ ('https://api.apify.com' , 'https://custom-public-url.com/with/custom/path/' ),
23
+ ('http://10.0.88.214:8010' , 'https://api.apify.com' ),
24
+ ('http://10.0.88.214:8010' , None ),
25
+ ],
26
+ )
Original file line number Diff line number Diff line change 5
5
6
6
import impit
7
7
8
- from integration .conftest import parametrized_api_urls
9
- from integration .integration_test_utils import random_resource_name
8
+ from integration .integration_test_utils import parametrized_api_urls , random_resource_name
10
9
11
10
from apify_client import ApifyClient , ApifyClientAsync
12
11
from apify_client .client import DEFAULT_API_URL
Original file line number Diff line number Diff line change 5
5
6
6
import impit
7
7
8
- from integration .conftest import parametrized_api_urls
9
- from integration .integration_test_utils import random_resource_name
8
+ from integration .integration_test_utils import parametrized_api_urls , random_resource_name
10
9
11
10
from apify_client import ApifyClient , ApifyClientAsync
12
11
from apify_client .client import DEFAULT_API_URL
You can’t perform that action at this time.
0 commit comments