@@ -33,7 +33,7 @@ def test_parse_file_empty_multiple_pages_must_succeed(
3333 v2_client : ClientV2 , findoc_model_id : str
3434) -> None :
3535 """
36- Upload a 2-page blank PDF and make sure the returned inference contains the
36+ Upload a 2-page almost blank PDF and make sure the returned inference contains the
3737 file & model metadata.
3838 """
3939 input_path : Path = FILE_TYPES_DIR / "pdf" / "multipage_cut-2.pdf"
@@ -73,6 +73,37 @@ 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 blank PDF and make sure the options are set correctly.
83+ """
84+ input_path : Path = FILE_TYPES_DIR / "pdf" / "blank_1.pdf"
85+
86+ input_source = PathInput (input_path )
87+ params = InferenceParameters (
88+ model_id = findoc_model_id ,
89+ rag = True ,
90+ raw_text = True ,
91+ polygon = True ,
92+ confidence = True ,
93+ webhook_ids = [],
94+ alias = "py_integration_empty_page_options" ,
95+ )
96+ response : InferenceResponse = v2_client .enqueue_and_get_inference (
97+ input_source , params
98+ )
99+
100+ assert response .inference .active_options is not None
101+ assert response .inference .active_options .rag is True
102+ assert response .inference .active_options .raw_text is True
103+ assert response .inference .active_options .polygon is True
104+ assert response .inference .active_options .confidence is True
105+
106+
76107@pytest .mark .integration
77108@pytest .mark .v2
78109def test_parse_file_filled_single_page_must_succeed (
@@ -86,10 +117,6 @@ def test_parse_file_filled_single_page_must_succeed(
86117 input_source = PathInput (input_path )
87118 params = InferenceParameters (
88119 model_id = findoc_model_id ,
89- rag = False ,
90- raw_text = False ,
91- polygon = False ,
92- confidence = False ,
93120 webhook_ids = [],
94121 alias = "py_integration_filled_single" ,
95122 )
0 commit comments