|
5 | 5 |
|
6 | 6 | import pytest |
7 | 7 | from uipath.core.feature_flags import FeatureFlags |
8 | | -from uipath.platform.semantic_proxy import ( |
| 8 | +from uipath.platform.pii_detection import ( |
9 | 9 | PiiDetectionResponse, |
10 | 10 | PiiDocumentResult, |
11 | 11 | PiiEntity, |
@@ -53,8 +53,8 @@ def _make_client( |
53 | 53 | upload_result: uuid.UUID | None = None, |
54 | 54 | ) -> Mock: |
55 | 55 | client = Mock() |
56 | | - client.semantic_proxy = Mock() |
57 | | - client.semantic_proxy.detect_pii_async = AsyncMock(return_value=response) |
| 56 | + client.pii_detection = Mock() |
| 57 | + client.pii_detection.detect_pii_async = AsyncMock(return_value=response) |
58 | 58 | client.jobs = Mock() |
59 | 59 | client.jobs.create_attachment_async = AsyncMock( |
60 | 60 | return_value=upload_result or uuid.uuid4() |
@@ -241,7 +241,7 @@ async def test_masks_prompt_and_annotates_files(self, httpx_mock): |
241 | 241 | assert masked_files[0].masked_attachment_id == str(uploaded_uuid) |
242 | 242 | assert masked_files[0].attachment_id == "orig-uuid" |
243 | 243 |
|
244 | | - request = client.semantic_proxy.detect_pii_async.call_args[0][0] |
| 244 | + request = client.pii_detection.detect_pii_async.call_args[0][0] |
245 | 245 | assert request.files[0].file_name == "doc.pdf" |
246 | 246 | assert request.files[0].file_type == "pdf" |
247 | 247 |
|
@@ -315,7 +315,7 @@ async def test_passes_entity_thresholds_from_policy(self): |
315 | 315 |
|
316 | 316 | await PiiMasker(client, policy).apply("original", []) |
317 | 317 |
|
318 | | - request = client.semantic_proxy.detect_pii_async.call_args[0][0] |
| 318 | + request = client.pii_detection.detect_pii_async.call_args[0][0] |
319 | 319 | assert request.entity_thresholds == [ |
320 | 320 | PiiEntityThreshold(category="Email", confidence_threshold=0.6) |
321 | 321 | ] |
|
0 commit comments