Skip to content

Commit 21b8d51

Browse files
committed
Change default URL in unit tests
1 parent 9edfe93 commit 21b8d51

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

_test_unstructured_client/integration/test_integration_freemium.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212

1313
@pytest.fixture(scope="module")
1414
def client() -> UnstructuredClient:
15-
_client = UnstructuredClient(api_key_auth=os.getenv("UNSTRUCTURED_API_KEY"))
15+
_client = UnstructuredClient(
16+
api_key_auth=os.getenv("UNSTRUCTURED_API_KEY"),
17+
server="free-api",
18+
)
1619
yield _client
1720

1821

_test_unstructured_client/unit/test_custom_hooks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_unit_retry_with_backoff_does_retry(caplog):
2525

2626
with requests_mock.Mocker() as mock:
2727
# mock a 500 status code for POST requests to the api
28-
mock.post("https://api.unstructured.io/general/v0/general", status_code=500)
28+
mock.post("https://api.unstructuredapp.io/general/v0/general", status_code=500)
2929
session = UnstructuredClient(api_key_auth=FAKE_KEY)
3030

3131
with open(filename, "rb") as f:
@@ -55,7 +55,7 @@ def test_unit_backoff_strategy_logs_retries_5XX(status_code: int, caplog):
5555

5656
with requests_mock.Mocker() as mock:
5757
# mock a 500/503 status code for POST requests to the api
58-
mock.post("https://api.unstructured.io/general/v0/general", status_code=status_code)
58+
mock.post("https://api.unstructuredapp.io/general/v0/general", status_code=status_code)
5959
session = UnstructuredClient(api_key_auth=FAKE_KEY)
6060

6161
with open(filename, "rb") as f:
@@ -81,7 +81,7 @@ def test_unit_backoff_strategy_logs_retries_connection_error(caplog):
8181
)
8282
with requests_mock.Mocker() as mock:
8383
# mock a connection error response to POST request
84-
mock.post("https://api.unstructured.io/general/v0/general", exc=requests.exceptions.ConnectionError)
84+
mock.post("https://api.unstructuredapp.io/general/v0/general", exc=requests.exceptions.ConnectionError)
8585
session = UnstructuredClient(api_key_auth=FAKE_KEY)
8686

8787
with open(filename, "rb") as f:

0 commit comments

Comments
 (0)