66from mindee import ClientV2 , InferenceParameters , PathInput , UrlInputSource
77from mindee .error .mindee_http_error_v2 import MindeeHTTPErrorV2
88from mindee .parsing .v2 .inference_response import InferenceResponse
9- from tests .utils import FILE_TYPES_DIR , V1_PRODUCT_DATA_DIR
9+ from tests .utils import FILE_TYPES_DIR , V2_PRODUCT_DATA_DIR
1010
1111
1212@pytest .fixture (scope = "session" )
@@ -43,7 +43,6 @@ def test_parse_file_empty_multiple_pages_must_succeed(
4343 raw_text = True ,
4444 polygon = False ,
4545 confidence = False ,
46- webhook_ids = [],
4746 alias = "py_integration_empty_multiple" ,
4847 )
4948
@@ -88,13 +87,16 @@ def test_parse_file_empty_single_page_options_must_succeed(
8887 raw_text = True ,
8988 polygon = True ,
9089 confidence = True ,
91- webhook_ids = [],
9290 alias = "py_integration_empty_page_options" ,
9391 )
9492 response : InferenceResponse = v2_client .enqueue_and_get_inference (
9593 input_source , params
9694 )
9795
96+ assert response .inference .file is not None
97+ assert response .inference .file .name == "blank_1.pdf"
98+ assert response .inference .file .page_count == 1
99+
98100 assert response .inference .active_options is not None
99101 assert response .inference .active_options .rag is True
100102 assert response .inference .active_options .raw_text is True
@@ -110,7 +112,7 @@ def test_parse_file_filled_single_page_must_succeed(
110112 """
111113 Upload a filled single-page JPEG and verify that common fields are present.
112114 """
113- input_path : Path = V1_PRODUCT_DATA_DIR / "financial_document" / "default_sample.jpg"
115+ input_path : Path = V2_PRODUCT_DATA_DIR / "financial_document" / "default_sample.jpg"
114116
115117 input_source = PathInput (input_path )
116118 params = InferenceParameters (
@@ -222,7 +224,7 @@ def test_unknown_webhook_ids_must_throw_error(
222224
223225@pytest .mark .integration
224226@pytest .mark .v2
225- def test_url_input_source_must_not_raise_errors (
227+ def test_blank_url_input_source_must_succeed (
226228 v2_client : ClientV2 ,
227229 findoc_model_id : str ,
228230) -> None :
@@ -246,3 +248,6 @@ def test_url_input_source_must_not_raise_errors(
246248 )
247249 assert response is not None
248250 assert response .inference is not None
251+
252+ assert response .inference .file is not None
253+ assert response .inference .file .page_count == 1
0 commit comments