@@ -73,6 +73,38 @@ def test_parse_file_empty_multiple_pages_must_succeed(
7373 assert len (response .inference .result .raw_text .pages ) == 2
7474
7575
76+ @pytest .mark .integration
77+ @pytest .mark .v2
78+ def test_parse_file_empty_single_page_options_must_succeed (
79+ v2_client : ClientV2 , findoc_model_id : str
80+ ) -> None :
81+ """
82+ Upload a 2-page blank PDF and make sure the returned inference contains the
83+ file & model metadata.
84+ """
85+ input_path : Path = FILE_TYPES_DIR / "pdf" / "blank_1.pdf"
86+
87+ input_source = PathInput (input_path )
88+ params = InferenceParameters (
89+ model_id = findoc_model_id ,
90+ rag = True ,
91+ raw_text = True ,
92+ polygon = True ,
93+ confidence = True ,
94+ webhook_ids = [],
95+ alias = "py_integration_empty_page_options" ,
96+ )
97+ response : InferenceResponse = v2_client .enqueue_and_get_inference (
98+ input_source , params
99+ )
100+
101+ assert response .inference .active_options is not None
102+ assert response .inference .active_options .rag is True
103+ assert response .inference .active_options .raw_text is True
104+ assert response .inference .active_options .polygon is True
105+ assert response .inference .active_options .confidence is True
106+
107+
76108@pytest .mark .integration
77109@pytest .mark .v2
78110def test_parse_file_filled_single_page_must_succeed (
@@ -86,10 +118,6 @@ def test_parse_file_filled_single_page_must_succeed(
86118 input_source = PathInput (input_path )
87119 params = InferenceParameters (
88120 model_id = findoc_model_id ,
89- rag = False ,
90- raw_text = False ,
91- polygon = False ,
92- confidence = False ,
93121 webhook_ids = [],
94122 alias = "py_integration_filled_single" ,
95123 )
0 commit comments