@@ -550,6 +550,7 @@ def test_create_security_settings(
550
550
redaction_strategy = gcdc_security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
551
551
redaction_scope = gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
552
552
inspect_template = "inspect_template_value" ,
553
+ deidentify_template = "deidentify_template_value" ,
553
554
purge_data_types = [
554
555
gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
555
556
],
@@ -575,6 +576,7 @@ def test_create_security_settings(
575
576
== gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
576
577
)
577
578
assert response .inspect_template == "inspect_template_value"
579
+ assert response .deidentify_template == "deidentify_template_value"
578
580
assert response .purge_data_types == [
579
581
gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
580
582
]
@@ -626,6 +628,7 @@ async def test_create_security_settings_async(
626
628
redaction_strategy = gcdc_security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
627
629
redaction_scope = gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
628
630
inspect_template = "inspect_template_value" ,
631
+ deidentify_template = "deidentify_template_value" ,
629
632
purge_data_types = [
630
633
gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
631
634
],
@@ -651,6 +654,7 @@ async def test_create_security_settings_async(
651
654
== gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
652
655
)
653
656
assert response .inspect_template == "inspect_template_value"
657
+ assert response .deidentify_template == "deidentify_template_value"
654
658
assert response .purge_data_types == [
655
659
gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
656
660
]
@@ -842,6 +846,7 @@ def test_get_security_settings(
842
846
redaction_strategy = security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
843
847
redaction_scope = security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
844
848
inspect_template = "inspect_template_value" ,
849
+ deidentify_template = "deidentify_template_value" ,
845
850
purge_data_types = [
846
851
security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
847
852
],
@@ -867,6 +872,7 @@ def test_get_security_settings(
867
872
== security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
868
873
)
869
874
assert response .inspect_template == "inspect_template_value"
875
+ assert response .deidentify_template == "deidentify_template_value"
870
876
assert response .purge_data_types == [
871
877
security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
872
878
]
@@ -918,6 +924,7 @@ async def test_get_security_settings_async(
918
924
redaction_strategy = security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
919
925
redaction_scope = security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
920
926
inspect_template = "inspect_template_value" ,
927
+ deidentify_template = "deidentify_template_value" ,
921
928
purge_data_types = [
922
929
security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
923
930
],
@@ -943,6 +950,7 @@ async def test_get_security_settings_async(
943
950
== security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
944
951
)
945
952
assert response .inspect_template == "inspect_template_value"
953
+ assert response .deidentify_template == "deidentify_template_value"
946
954
assert response .purge_data_types == [
947
955
security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
948
956
]
@@ -1111,6 +1119,7 @@ def test_update_security_settings(
1111
1119
redaction_strategy = gcdc_security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
1112
1120
redaction_scope = gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
1113
1121
inspect_template = "inspect_template_value" ,
1122
+ deidentify_template = "deidentify_template_value" ,
1114
1123
purge_data_types = [
1115
1124
gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
1116
1125
],
@@ -1136,6 +1145,7 @@ def test_update_security_settings(
1136
1145
== gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
1137
1146
)
1138
1147
assert response .inspect_template == "inspect_template_value"
1148
+ assert response .deidentify_template == "deidentify_template_value"
1139
1149
assert response .purge_data_types == [
1140
1150
gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
1141
1151
]
@@ -1187,6 +1197,7 @@ async def test_update_security_settings_async(
1187
1197
redaction_strategy = gcdc_security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
1188
1198
redaction_scope = gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
1189
1199
inspect_template = "inspect_template_value" ,
1200
+ deidentify_template = "deidentify_template_value" ,
1190
1201
purge_data_types = [
1191
1202
gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
1192
1203
],
@@ -1212,6 +1223,7 @@ async def test_update_security_settings_async(
1212
1223
== gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
1213
1224
)
1214
1225
assert response .inspect_template == "inspect_template_value"
1226
+ assert response .deidentify_template == "deidentify_template_value"
1215
1227
assert response .purge_data_types == [
1216
1228
gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
1217
1229
]
@@ -2487,6 +2499,60 @@ def test_security_settings_service_transport_channel_mtls_with_adc(transport_cla
2487
2499
assert transport .grpc_channel == mock_grpc_channel
2488
2500
2489
2501
2502
+ def test_deidentify_template_path ():
2503
+ organization = "squid"
2504
+ location = "clam"
2505
+ deidentify_template = "whelk"
2506
+ expected = "organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}" .format (
2507
+ organization = organization ,
2508
+ location = location ,
2509
+ deidentify_template = deidentify_template ,
2510
+ )
2511
+ actual = SecuritySettingsServiceClient .deidentify_template_path (
2512
+ organization , location , deidentify_template
2513
+ )
2514
+ assert expected == actual
2515
+
2516
+
2517
+ def test_parse_deidentify_template_path ():
2518
+ expected = {
2519
+ "organization" : "octopus" ,
2520
+ "location" : "oyster" ,
2521
+ "deidentify_template" : "nudibranch" ,
2522
+ }
2523
+ path = SecuritySettingsServiceClient .deidentify_template_path (** expected )
2524
+
2525
+ # Check that the path construction is reversible.
2526
+ actual = SecuritySettingsServiceClient .parse_deidentify_template_path (path )
2527
+ assert expected == actual
2528
+
2529
+
2530
+ def test_inspect_template_path ():
2531
+ organization = "cuttlefish"
2532
+ location = "mussel"
2533
+ inspect_template = "winkle"
2534
+ expected = "organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}" .format (
2535
+ organization = organization , location = location , inspect_template = inspect_template ,
2536
+ )
2537
+ actual = SecuritySettingsServiceClient .inspect_template_path (
2538
+ organization , location , inspect_template
2539
+ )
2540
+ assert expected == actual
2541
+
2542
+
2543
+ def test_parse_inspect_template_path ():
2544
+ expected = {
2545
+ "organization" : "nautilus" ,
2546
+ "location" : "scallop" ,
2547
+ "inspect_template" : "abalone" ,
2548
+ }
2549
+ path = SecuritySettingsServiceClient .inspect_template_path (** expected )
2550
+
2551
+ # Check that the path construction is reversible.
2552
+ actual = SecuritySettingsServiceClient .parse_inspect_template_path (path )
2553
+ assert expected == actual
2554
+
2555
+
2490
2556
def test_security_settings_path ():
2491
2557
project = "squid"
2492
2558
location = "clam"
0 commit comments