Skip to content

Commit 5fae267

Browse files
authored
chore: use approved sample names and addresses (#7542)
1 parent b3a6ca9 commit 5fae267

File tree

6 files changed

+43
-43
lines changed

6 files changed

+43
-43
lines changed

tests/functional/data_masking/_aws_encryption_sdk/test_aws_encryption_sdk.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -351,25 +351,25 @@ def test_encrypt_with_complex_dict(data_masker):
351351
# GIVEN the data type is a json representation of a dictionary with a list inside
352352
data = json.dumps(
353353
{
354-
"name": "Leandro",
354+
"name": "Pat",
355355
"operation": "non sensitive",
356356
"card_number": "1000 4444 333 2222",
357357
"address": [
358358
{
359-
"postcode": 81847,
360-
"street": "38986 Joanne Stravenue",
359+
"postcode": 10001,
360+
"street": "123 Any Street, Any Town",
361361
"country": "United States",
362362
"timezone": "America/La_Paz",
363363
},
364364
{
365-
"postcode": 94400,
366-
"street": "623 Kraig Mall",
365+
"postcode": 10000,
366+
"street": "100 Main Street",
367367
"country": "United States",
368368
"timezone": "America/Mazatlan",
369369
},
370370
{
371-
"postcode": 94480,
372-
"street": "123 Kraig Mall",
371+
"postcode": 10001,
372+
"street": "123 Any Street, Any Town",
373373
"country": "United States",
374374
"timezone": "America/Mazatlan",
375375
},
@@ -389,25 +389,25 @@ def test_encrypt_with_slice(data_masker):
389389
# GIVEN the data type is a json representation of a dictionary with a list inside
390390
data = json.dumps(
391391
{
392-
"name": "Leandro",
392+
"name": "Pat",
393393
"operation": "non sensitive",
394394
"card_number": "1000 4444 333 2222",
395395
"address": [
396396
{
397-
"postcode": 81847,
398-
"street": "38986 Joanne Stravenue",
397+
"postcode": 10001,
398+
"street": "123 Any Street, Any Town",
399399
"country": "United States",
400400
"timezone": "America/La_Paz",
401401
},
402402
{
403-
"postcode": 94400,
404-
"street": "623 Kraig Mall",
403+
"postcode": 10000,
404+
"street": "100 Main Street",
405405
"country": "United States",
406406
"timezone": "America/Mazatlan",
407407
},
408408
{
409-
"postcode": 94480,
410-
"street": "123 Kraig Mall",
409+
"postcode": 10001,
410+
"street": "123 Any Street, Any Town",
411411
"country": "United States",
412412
"timezone": "America/Mazatlan",
413413
},
@@ -427,25 +427,25 @@ def test_encrypt_with_complex_search(data_masker):
427427
# GIVEN the data type is a json representation of a dictionary with a list inside
428428
data = json.dumps(
429429
{
430-
"name": "Leandro",
430+
"name": "Pat",
431431
"operation": "non sensitive",
432432
"card_number": "1000 4444 333 2222",
433433
"address": [
434434
{
435-
"postcode": 81847,
436-
"street": "38986 Joanne Stravenue",
435+
"postcode": 10001,
436+
"street": "123 Any Street, Any Town",
437437
"country": "United States",
438438
"timezone": "America/La_Paz",
439439
},
440440
{
441-
"postcode": 94400,
442-
"street": "623 Kraig Mall",
441+
"postcode": 10000,
442+
"street": "100 Main Street",
443443
"country": "United States",
444444
"timezone": "America/Mazatlan",
445445
},
446446
{
447-
"postcode": 94480,
448-
"street": "123 Kraig Mall",
447+
"postcode": 10001,
448+
"street": "123 Any Street, Any Town",
449449
"country": "United States",
450450
"timezone": "America/Mazatlan",
451451
},

tests/functional/data_masking/required_dependencies/test_erase_data_masking.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ def test_erase_dictionary_with_masking_rules(data_masker):
375375

376376
def test_erase_dictionary_with_masking_rules_with_list(data_masker):
377377
# GIVEN a dictionary with nested sensitive data
378-
data = {"user": {"name": ["leandro", "powertools"]}}
378+
data = {"user": {"name": ["Pat", "powertools"]}}
379379

380380
# AND masking rules for specific fields
381381
masking_rules = {"user.name": {"custom_mask": "NO-NAME"}}
@@ -393,15 +393,15 @@ def test_erase_dictionary_with_masking_rules_with_list(data_masker):
393393

394394
def test_erase_list_with_custom_mask(data_masker):
395395
# GIVEN a dictionary with nested sensitive data
396-
data = {"user": {"name": ["leandro", "powertools"]}}
396+
data = {"user": {"name": ["Pat", "powertools"]}}
397397

398398
# WHEN erase is called with masking rules
399399
result = data_masker.erase(data, fields=["user.name"], dynamic_mask=True)
400400

401401
# THEN only the specified fields should be masked
402402
assert result == {
403403
"user": {
404-
"name": ["*******", "**********"],
404+
"name": ["***", "**********"],
405405
},
406406
}
407407

tests/functional/event_handler/required_dependencies/test_api_gateway.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ def test_api_gateway_app_with_strip_prefix_and_route_prefix():
13351335
app = ApiGatewayResolver(strip_prefixes=["/v1"])
13361336
router = Router()
13371337

1338-
event = {"httpMethod": "GET", "path": "/v1/users/leandro", "resource": "/users"}
1338+
event = {"httpMethod": "GET", "path": "/v1/users/pat", "resource": "/users"}
13391339

13401340
@router.get("<user_id>")
13411341
def base(user_id: str):

tests/functional/feature_flags/_boto3/test_feature_flags.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,7 +1459,7 @@ def test_flags_any_in_value_match(mocker, config):
14591459
{
14601460
"action": RuleAction.ANY_IN_VALUE.value,
14611461
"key": "tenant_id",
1462-
"value": ["Łukasz", "Gerald", "Leandro", "Heitor"],
1462+
"value": ["Akua", "John", "Maria", "Pat"],
14631463
},
14641464
],
14651465
},
@@ -1470,7 +1470,7 @@ def test_flags_any_in_value_match(mocker, config):
14701470
feature_flags = init_feature_flags(mocker, mocked_app_config_schema, config)
14711471
toggle = feature_flags.evaluate(
14721472
name="my_feature",
1473-
context={"tenant_id": ["Gerald"]},
1473+
context={"tenant_id": ["Akua"]},
14741474
default=False,
14751475
)
14761476
assert toggle == expected_value
@@ -1488,7 +1488,7 @@ def test_flags_any_in_value_no_match(mocker, config):
14881488
{
14891489
"action": RuleAction.ANY_IN_VALUE.value,
14901490
"key": "tenant_id",
1491-
"value": ["Łukasz", "Gerald", "Leandro", "Heitor"],
1491+
"value": ["Akua", "John", "Maria", "Pat"],
14921492
},
14931493
],
14941494
},
@@ -1499,7 +1499,7 @@ def test_flags_any_in_value_no_match(mocker, config):
14991499
feature_flags = init_feature_flags(mocker, mocked_app_config_schema, config)
15001500
toggle = feature_flags.evaluate(
15011501
name="my_feature",
1502-
context={"tenant_id": ["Simon"]},
1502+
context={"tenant_id": ["Kwesi"]},
15031503
default=False,
15041504
)
15051505
assert toggle == expected_value
@@ -1517,7 +1517,7 @@ def test_flags_all_in_value_match(mocker, config):
15171517
{
15181518
"action": RuleAction.ALL_IN_VALUE.value,
15191519
"key": "tenant_id",
1520-
"value": ["Łukasz", "Gerald", "Leandro", "Heitor"],
1520+
"value": ["Akua", "John", "Maria", "Pat"],
15211521
},
15221522
],
15231523
},
@@ -1528,7 +1528,7 @@ def test_flags_all_in_value_match(mocker, config):
15281528
feature_flags = init_feature_flags(mocker, mocked_app_config_schema, config)
15291529
toggle = feature_flags.evaluate(
15301530
name="my_feature",
1531-
context={"tenant_id": ["Gerald"]},
1531+
context={"tenant_id": ["Akua"]},
15321532
default=False,
15331533
)
15341534

@@ -1547,7 +1547,7 @@ def test_flags_all_in_value_no_match(mocker, config):
15471547
{
15481548
"action": RuleAction.ALL_IN_VALUE.value,
15491549
"key": "tenant_id",
1550-
"value": ["Łukasz", "Gerald", "Leandro", "Heitor"],
1550+
"value": ["Akua", "John", "Maria", "Pat"],
15511551
},
15521552
],
15531553
},
@@ -1558,7 +1558,7 @@ def test_flags_all_in_value_no_match(mocker, config):
15581558
feature_flags = init_feature_flags(mocker, mocked_app_config_schema, config)
15591559
toggle = feature_flags.evaluate(
15601560
name="my_feature",
1561-
context={"tenant_id": ["Gerald", "Simon"]},
1561+
context={"tenant_id": ["Akua", "Mary"]},
15621562
default=False,
15631563
)
15641564

@@ -1577,7 +1577,7 @@ def test_flags_none_in_value_match(mocker, config):
15771577
{
15781578
"action": RuleAction.NONE_IN_VALUE.value,
15791579
"key": "tenant_id",
1580-
"value": ["Łukasz", "Gerald", "Leandro", "Heitor"],
1580+
"value": ["Akua", "John", "Maria", "Pat"],
15811581
},
15821582
],
15831583
},
@@ -1588,7 +1588,7 @@ def test_flags_none_in_value_match(mocker, config):
15881588
feature_flags = init_feature_flags(mocker, mocked_app_config_schema, config)
15891589
toggle = feature_flags.evaluate(
15901590
name="my_feature",
1591-
context={"tenant_id": ["Rubao"]},
1591+
context={"tenant_id": ["Mary"]},
15921592
default=False,
15931593
)
15941594

@@ -1607,7 +1607,7 @@ def test_flags_none_in_value_no_match(mocker, config):
16071607
{
16081608
"action": RuleAction.NONE_IN_VALUE.value,
16091609
"key": "tenant_id",
1610-
"value": ["Łukasz", "Gerald", "Leandro", "Heitor"],
1610+
"value": ["Akua", "John", "Maria", "Pat"],
16111611
},
16121612
],
16131613
},
@@ -1618,7 +1618,7 @@ def test_flags_none_in_value_no_match(mocker, config):
16181618
feature_flags = init_feature_flags(mocker, mocked_app_config_schema, config)
16191619
toggle = feature_flags.evaluate(
16201620
name="my_feature",
1621-
context={"tenant_id": ["Heitor"]},
1621+
context={"tenant_id": ["Pat"]},
16221622
default=False,
16231623
)
16241624

@@ -1646,7 +1646,7 @@ def test_intersection_non_list_value(mocker, config, intersection_action):
16461646
{
16471647
"action": intersection_action,
16481648
"key": "tenant_id",
1649-
"value": ["Łukasz", "Gerald", "Leandro", "Heitor"],
1649+
"value": ["Akua", "John", "Maria", "Pat"],
16501650
},
16511651
],
16521652
},
@@ -1680,7 +1680,7 @@ def test_exception_handler(mocker, config):
16801680
{
16811681
"action": RuleAction.ANY_IN_VALUE.value,
16821682
"key": "tenant_id",
1683-
"value": ["Łukasz", "Gerald", "Leandro", "Heitor"],
1683+
"value": ["Akua", "John", "Maria", "Pat"],
16841684
},
16851685
],
16861686
},

tests/functional/feature_flags/_boto3/test_schema_validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ def test_validate_all_in_value_condition_invalid_value():
10471047
# GIVEN a schema with a ANY_IN_VALUE action with non-list value
10481048
condition = {
10491049
CONDITION_ACTION: RuleAction.ALL_IN_VALUE.value,
1050-
CONDITION_VALUE: "Leandro",
1050+
CONDITION_VALUE: "Pat",
10511051
}
10521052

10531053
rule_name = "non-list value for ALL_IN_VALUE"

tests/unit/parser/_pydantic/test_vpc_lattice.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99
def test_vpc_lattice_event_with_envelope():
1010
raw_event = load_event("vpcLatticeEvent.json")
11-
raw_event["body"] = '{"username": "Leandro", "name": "Damascena"}'
11+
raw_event["body"] = '{"username": "Akua", "name": "Mansa"}'
1212
parsed_event: MyVpcLatticeBusiness = parse(
1313
event=raw_event,
1414
model=MyVpcLatticeBusiness,
1515
envelope=envelopes.VpcLatticeEnvelope,
1616
)
1717

18-
assert parsed_event.username == "Leandro"
19-
assert parsed_event.name == "Damascena"
18+
assert parsed_event.username == "Akua"
19+
assert parsed_event.name == "Mansa"
2020

2121

2222
def test_vpc_lattice_event():

0 commit comments

Comments
 (0)