-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathconftest.py
More file actions
29 lines (22 loc) · 771 Bytes
/
conftest.py
File metadata and controls
29 lines (22 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import os
import pytest
from unstructured_client import UnstructuredClient, RetryConfig
from unstructured_client.utils import BackoffStrategy
FAKE_API_KEY = "91pmLBeETAbXCpNylRsLq11FdiZPTk"
@pytest.fixture(scope="module")
def platform_api_url():
return "https://platform.unstructuredapp.io"
@pytest.fixture(scope="module")
def client(platform_api_url) -> UnstructuredClient:
_client = UnstructuredClient(
api_key_auth=FAKE_API_KEY,
server_url=platform_api_url,
retry_config=RetryConfig(
strategy="backoff",
retry_connection_errors=False,
backoff=BackoffStrategy(
max_elapsed_time=0, max_interval=0, exponent=0, initial_interval=0
),
),
)
yield _client