Skip to content

Commit f94a339

Browse files
committed
update
1 parent c0bf55f commit f94a339

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

_test_unstructured_client/integration/test_platform_workflow_lifecycle.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,27 +114,27 @@ def test_workflow_lifecycle(
114114
request=operations.ListTemplatesRequest()
115115
)
116116
assert list_templates_response.status_code == 200
117-
assert "templates" in list_templates_response.response_list_templates
118-
templates = list_templates_response.response_list_templates["templates"]
117+
assert list_templates_response.response_list_templates is not None
118+
templates = list_templates_response.response_list_templates
119119
assert isinstance(templates, list)
120120
assert len(templates) > 0
121121

122122
# Verify we have expected templates
123-
template_ids = [t.get("id") for t in templates]
123+
template_ids = [t.id for t in templates]
124124
assert "hi_res_partition" in template_ids or "hi_res_and_enrichment" in template_ids
125125

126126
# 4. Get template
127127
template_id = "hi_res_partition"
128128
if template_id not in template_ids and len(templates) > 0:
129-
template_id = templates[0].get("id")
129+
template_id = templates[0].id
130130

131131
get_template_response = platform_client.templates.get_template(
132132
request=operations.GetTemplateRequest(template_id=template_id)
133133
)
134134
assert get_template_response.status_code == 200
135-
assert "template" in get_template_response.response_get_template
136-
template = get_template_response.response_get_template["template"]
137-
assert template.get("id") == template_id
135+
assert get_template_response.template_detail is not None
136+
template = get_template_response.template_detail
137+
assert template.id == template_id
138138

139139
# 5. Create job (on-demand using template)
140140
request_data = json.dumps({

0 commit comments

Comments
 (0)