@@ -144,8 +144,8 @@ def template_id(
144
144
def sdp_templates (
145
145
project_id : str , location_id : str
146
146
) -> Generator [Tuple [str , str ], None , None ]:
147
- inspect_template_id = f"model-armour -inspect-template-{ uuid .uuid4 ()} "
148
- deidentify_template_id = f"model-armour -deidentify-template-{ uuid .uuid4 ()} "
147
+ inspect_template_id = f"model-armor -inspect-template-{ uuid .uuid4 ()} "
148
+ deidentify_template_id = f"model-armor -deidentify-template-{ uuid .uuid4 ()} "
149
149
api_endpoint = f"dlp.{ location_id } .rep.googleapis.com"
150
150
parent = f"projects/{ project_id } /locations/{ location_id } "
151
151
info_types = [
@@ -533,12 +533,12 @@ def test_create_model_armor_template_with_advanced_sdp(
533
533
that matches the expected format.
534
534
"""
535
535
536
- sdr_inspect_template_id , sdr_deidentify_template_id = sdp_templates
536
+ sdp_inspect_template_id , sdr_deidentify_template_id = sdp_templates
537
537
created_template = create_model_armor_template_with_advanced_sdp (
538
538
project_id ,
539
539
location_id ,
540
540
template_id ,
541
- sdr_inspect_template_id ,
541
+ sdp_inspect_template_id ,
542
542
sdr_deidentify_template_id ,
543
543
)
544
544
@@ -554,8 +554,8 @@ def test_create_model_armor_template_with_advanced_sdp(
554
554
created_template .filter_config .sdp_settings .advanced_config
555
555
)
556
556
assert (
557
- advanced_config .inspect_template == sdr_inspect_template_id
558
- ), f"Expected inspect_template to be { sdr_inspect_template_id } , but got { advanced_config .inspect_template } "
557
+ advanced_config .inspect_template == sdp_inspect_template_id
558
+ ), f"Expected inspect_template to be { sdp_inspect_template_id } , but got { advanced_config .inspect_template } "
559
559
560
560
assert (
561
561
advanced_config .deidentify_template == sdr_deidentify_template_id
@@ -877,6 +877,12 @@ def test_sanitize_user_prompt_with_advance_sdp_template(
877
877
project_id , location_id , template_id , user_prompt
878
878
)
879
879
880
+ print (
881
+ response .sanitization_result .filter_results .get (
882
+ "sdp"
883
+ ).sdp_filter_result .deidentify_result .info_type
884
+ )
885
+
880
886
assert (
881
887
response .sanitization_result .filter_match_state
882
888
== modelarmor_v1 .FilterMatchState .MATCH_FOUND
0 commit comments