|
5 | 5 |
|
6 | 6 | from mindee import ClientV2, InferenceParameters, PathInput, UrlInputSource |
7 | 7 | from mindee.error.mindee_http_error_v2 import MindeeHTTPErrorV2 |
| 8 | +from mindee.parsing.v2 import InferenceActiveOptions |
8 | 9 | from mindee.parsing.v2.inference_response import InferenceResponse |
9 | 10 | from tests.utils import FILE_TYPES_DIR, V2_PRODUCT_DATA_DIR |
10 | 11 |
|
@@ -59,11 +60,13 @@ def test_parse_file_empty_multiple_pages_must_succeed( |
59 | 60 | assert response.inference.model is not None |
60 | 61 | assert response.inference.model.id == findoc_model_id |
61 | 62 |
|
| 63 | + assert isinstance(response.inference.active_options, InferenceActiveOptions) |
62 | 64 | assert response.inference.active_options is not None |
63 | 65 | assert response.inference.active_options.rag is False |
64 | 66 | assert response.inference.active_options.raw_text is True |
65 | 67 | assert response.inference.active_options.polygon is False |
66 | 68 | assert response.inference.active_options.confidence is False |
| 69 | + assert response.inference.active_options.text_context is False |
67 | 70 |
|
68 | 71 | assert response.inference.result is not None |
69 | 72 |
|
@@ -103,11 +106,13 @@ def test_parse_file_empty_single_page_options_must_succeed( |
103 | 106 | assert response.inference.file.name == "blank_1.pdf" |
104 | 107 | assert response.inference.file.page_count == 1 |
105 | 108 |
|
| 109 | + assert isinstance(response.inference.active_options, InferenceActiveOptions) |
106 | 110 | assert response.inference.active_options is not None |
107 | 111 | assert response.inference.active_options.rag is True |
108 | 112 | assert response.inference.active_options.raw_text is True |
109 | 113 | assert response.inference.active_options.polygon is True |
110 | 114 | assert response.inference.active_options.confidence is True |
| 115 | + assert response.inference.active_options.text_context is False |
111 | 116 |
|
112 | 117 | assert response.inference.result is not None |
113 | 118 |
|
@@ -148,11 +153,13 @@ def test_parse_file_filled_single_page_must_succeed( |
148 | 153 | assert response.inference.model is not None |
149 | 154 | assert response.inference.model.id == findoc_model_id |
150 | 155 |
|
| 156 | + assert isinstance(response.inference.active_options, InferenceActiveOptions) |
151 | 157 | assert response.inference.active_options is not None |
152 | 158 | assert response.inference.active_options.rag is False |
153 | 159 | assert response.inference.active_options.raw_text is False |
154 | 160 | assert response.inference.active_options.polygon is False |
155 | 161 | assert response.inference.active_options.confidence is False |
| 162 | + assert response.inference.active_options.text_context is True |
156 | 163 |
|
157 | 164 | assert response.inference.result.raw_text is None |
158 | 165 |
|
|
0 commit comments