@@ -21,7 +21,15 @@ def test_live_extract_images_success(
2121 response = client .extract_images (uploaded )
2222
2323 assert isinstance (response , PdfRestFileBasedResponse )
24- assert response .output_files
24+ output_files = response .output_files
25+ assert output_files
26+ assert all (file .name for file in output_files )
27+ assert all (
28+ file .type and (file .type .startswith ("image/" ) or file .type == "application/zip" )
29+ for file in output_files
30+ )
31+ assert all (file .size > 0 for file in output_files )
32+ assert response .warning is None
2533 assert response .input_id == uploaded .id
2634
2735
@@ -39,8 +47,16 @@ async def test_live_async_extract_images_success(
3947 response = await client .extract_images (uploaded , output = "async-images" )
4048
4149 assert isinstance (response , PdfRestFileBasedResponse )
42- assert response .output_files
43- assert response .output_file .name .startswith ("async-images" )
50+ output_files = response .output_files
51+ assert output_files
52+ assert output_files [0 ].name .startswith ("async-images" )
53+ assert all (file .name for file in output_files )
54+ assert all (
55+ file .type and (file .type .startswith ("image/" ) or file .type == "application/zip" )
56+ for file in output_files
57+ )
58+ assert all (file .size > 0 for file in output_files )
59+ assert response .warning is None
4460 assert response .input_id == uploaded .id
4561
4662
0 commit comments