Skip to content

Commit e746721

Browse files
committed
test: make ids more realistic/correct
1 parent bceb216 commit e746721

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

_test_contract/platform_api/test_destinations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def test_list_destinations_5xx_code(
112112

113113

114114
def test_get_destination(httpx_mock, client: UnstructuredClient, platform_api_url: str):
115-
url = f"{platform_api_url}/api/v1/destinations/1"
115+
url = f"{platform_api_url}/api/v1/destinations/0c363dec-3c70-45ee-8041-481044a6e1cc"
116116

117117
httpx_mock.add_response(
118118
method="GET",
@@ -151,7 +151,7 @@ def test_get_destination(httpx_mock, client: UnstructuredClient, platform_api_ur
151151
def test_get_destination_not_found(
152152
httpx_mock, client: UnstructuredClient, platform_api_url: str
153153
):
154-
url = f"{platform_api_url}/api/v1/destinations/1"
154+
url = f"{platform_api_url}/api/v1/destinations/0c363dec-3c70-45ee-8041-481044a6e1cc"
155155

156156
httpx_mock.add_response(
157157
method="GET",
@@ -219,7 +219,7 @@ def test_create_destination(
219219
def test_update_destination(
220220
httpx_mock, client: UnstructuredClient, platform_api_url: str
221221
):
222-
url = f"{platform_api_url}/api/v1/destinations/1"
222+
url = f"{platform_api_url}/api/v1/destinations/b25d4161-77a0-4e08-b65e-86f398ce15ad"
223223

224224
httpx_mock.add_response(
225225
method="PUT",
@@ -264,7 +264,7 @@ def test_update_destination(
264264
def test_delete_destination(
265265
httpx_mock, client: UnstructuredClient, platform_api_url: str
266266
):
267-
url = f"{platform_api_url}/api/v1/destinations/1"
267+
url = f"{platform_api_url}/api/v1/destinations/b25d4161-77a0-4e08-b65e-86f398ce15ad"
268268

269269
httpx_mock.add_response(
270270
method="DELETE",

_test_contract/platform_api/test_sources.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def test_list_sources_5xx_code(
112112

113113

114114
def test_get_source(httpx_mock, client: UnstructuredClient, platform_api_url: str):
115-
url = f"{platform_api_url}/api/v1/sources/1"
115+
url = f"{platform_api_url}/api/v1/sources/a15d4161-77a0-4e08-b65e-86f398ce15ad"
116116

117117
httpx_mock.add_response(
118118
method="GET",
@@ -149,7 +149,7 @@ def test_get_source(httpx_mock, client: UnstructuredClient, platform_api_url: st
149149
def test_get_source_not_found(
150150
httpx_mock, client: UnstructuredClient, platform_api_url: str
151151
):
152-
url = f"{platform_api_url}/api/v1/sources/1"
152+
url = f"{platform_api_url}/api/v1/sources/a15d4161-77a0-4e08-b65e-86f398ce15ad"
153153

154154
httpx_mock.add_response(
155155
method="GET",
@@ -209,7 +209,7 @@ def test_create_source(httpx_mock, client: UnstructuredClient, platform_api_url:
209209

210210

211211
def test_update_source(httpx_mock, client: UnstructuredClient, platform_api_url: str):
212-
url = f"{platform_api_url}/api/v1/sources/1"
212+
url = f"{platform_api_url}/api/v1/sources/a15d4161-77a0-4e08-b65e-86f398ce15ad"
213213

214214
httpx_mock.add_response(
215215
method="PUT",
@@ -253,7 +253,7 @@ def test_update_source(httpx_mock, client: UnstructuredClient, platform_api_url:
253253

254254

255255
def test_delete_source(httpx_mock, client: UnstructuredClient, platform_api_url: str):
256-
url = f"{platform_api_url}/api/v1/sources/1"
256+
url = f"{platform_api_url}/api/v1/sources/a15d4161-77a0-4e08-b65e-86f398ce15ad"
257257

258258
httpx_mock.add_response(
259259
method="DELETE",

_test_contract/platform_api/test_workflows.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,12 @@ def test_list_workflows(httpx_mock, client: UnstructuredClient, platform_api_url
1818
"created_at": "2025-06-22T11:37:21.648Z",
1919
"destinations": [
2020
"aeebecc7-9d8e-4625-bf1d-815c2f084869",
21-
"01866db9-54f2-4be7-93c3-062b8107d001",
22-
"fcdc4994-eea5-425c-91fa-e03f2bd8030d",
2321
],
2422
"id": "16b80fee-64dc-472d-8f26-1d7729b6423d",
2523
"name": "test_workflow",
2624
"schedule": {"crontab_entries": [{"cron_expression": "0 0 * * *"}]},
2725
"sources": [
2826
"f1f7b1b2-8e4b-4a2b-8f1d-3e3c7c9e5a3c",
29-
"c2e3e2c7-4c6f-4c7d-8e8a-6d2e3c8d2e3c",
30-
"e3e2c7d3-4c6f-4c7d-8e8a-6d2e3c8d2e3c",
3127
],
3228
"status": "active",
3329
"workflow_type": "advanced",
@@ -62,14 +58,10 @@ def test_list_workflows(httpx_mock, client: UnstructuredClient, platform_api_url
6258

6359
assert workflow.sources == [
6460
"f1f7b1b2-8e4b-4a2b-8f1d-3e3c7c9e5a3c",
65-
"c2e3e2c7-4c6f-4c7d-8e8a-6d2e3c8d2e3c",
66-
"e3e2c7d3-4c6f-4c7d-8e8a-6d2e3c8d2e3c",
6761
]
6862

6963
assert workflow.destinations == [
7064
"aeebecc7-9d8e-4625-bf1d-815c2f084869",
71-
"01866db9-54f2-4be7-93c3-062b8107d001",
72-
"fcdc4994-eea5-425c-91fa-e03f2bd8030d",
7365
]
7466

7567

0 commit comments

Comments
 (0)