Skip to content

Commit c616850

Browse files
Minor typo fixes
1 parent a010b04 commit c616850

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

model_armor/snippets/list_templates_with_filter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def list_model_armor_templates_with_filter(
2929
Args:
3030
project_id (str): Google Cloud project ID.
3131
location_id (str): Google Cloud location.
32-
template_id (str): Model Armour Template ID(s) to filter from list.
32+
template_id (str): Model Armor Template ID(s) to filter from list.
3333
3434
Returns:
3535
List[str]: A list of template names.

model_armor/snippets/snippets_test.py

+12-6
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ def template_id(
144144
def sdp_templates(
145145
project_id: str, location_id: str
146146
) -> 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()}"
149149
api_endpoint = f"dlp.{location_id}.rep.googleapis.com"
150150
parent = f"projects/{project_id}/locations/{location_id}"
151151
info_types = [
@@ -533,12 +533,12 @@ def test_create_model_armor_template_with_advanced_sdp(
533533
that matches the expected format.
534534
"""
535535

536-
sdr_inspect_template_id, sdr_deidentify_template_id = sdp_templates
536+
sdp_inspect_template_id, sdr_deidentify_template_id = sdp_templates
537537
created_template = create_model_armor_template_with_advanced_sdp(
538538
project_id,
539539
location_id,
540540
template_id,
541-
sdr_inspect_template_id,
541+
sdp_inspect_template_id,
542542
sdr_deidentify_template_id,
543543
)
544544

@@ -554,8 +554,8 @@ def test_create_model_armor_template_with_advanced_sdp(
554554
created_template.filter_config.sdp_settings.advanced_config
555555
)
556556
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}"
559559

560560
assert (
561561
advanced_config.deidentify_template == sdr_deidentify_template_id
@@ -877,6 +877,12 @@ def test_sanitize_user_prompt_with_advance_sdp_template(
877877
project_id, location_id, template_id, user_prompt
878878
)
879879

880+
print(
881+
response.sanitization_result.filter_results.get(
882+
"sdp"
883+
).sdp_filter_result.deidentify_result.info_type
884+
)
885+
880886
assert (
881887
response.sanitization_result.filter_match_state
882888
== modelarmor_v1.FilterMatchState.MATCH_FOUND

0 commit comments

Comments
 (0)