Skip to content

Commit eb923c3

Browse files
committed
test fix
1 parent b5181a0 commit eb923c3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

_test_contract/platform_api/test_jobs.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ def test_cancel_job(httpx_mock, platform_client: UnstructuredClient, platform_ap
168168

169169

170170
def test_create_job(httpx_mock, platform_client: UnstructuredClient, platform_api_url: str):
171+
import json
172+
171173
url = f"{platform_api_url}/api/v1/jobs/"
172174

173175
httpx_mock.add_response(
@@ -195,11 +197,16 @@ def test_create_job(httpx_mock, platform_client: UnstructuredClient, platform_ap
195197
url=url,
196198
)
197199

200+
# request_data should be a JSON string containing the job creation data
201+
request_data = json.dumps({
202+
"job_type": "template",
203+
"template_id": "hi_res_partition",
204+
})
205+
198206
create_job_response = platform_client.jobs.create_job(
199207
request=operations.CreateJobRequest(
200208
body_create_job=shared.BodyCreateJob(
201-
job_type="template",
202-
template_id="hi_res_partition",
209+
request_data=request_data,
203210
)
204211
)
205212
)

0 commit comments

Comments
 (0)