Skip to content

Commit a4c1c8e

Browse files
committed
SDK-442: Shorten function name
1 parent 5972812 commit a4c1c8e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

yoti_python_sdk/activity_details.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __init__(self, receipt, decrypted_profile=None):
3737
if field.name == config.ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS:
3838
self.try_convert_structured_postal_address_to_dict(field, anchors)
3939

40-
self.set_address_to_be_formatted_address_if_null(anchors)
40+
self.ensure_postal_address(anchors)
4141

4242
self.user_id = receipt['remember_me_id']
4343
self.outcome = receipt['sharing_outcome']
@@ -77,7 +77,7 @@ def try_convert_structured_postal_address_to_dict(self, field, anchors):
7777
decoder.decode(value_to_decode),
7878
anchors)
7979

80-
def set_address_to_be_formatted_address_if_null(self, anchors):
80+
def ensure_postal_address(self, anchors):
8181
# setting in 'user_profile' - will be removed once user_profile is removed
8282
if config.ATTRIBUTE_POSTAL_ADDRESS not in self.user_profile and config.ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS in self.user_profile:
8383
if config.KEY_FORMATTED_ADDRESS in self.user_profile[config.ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS]:

yoti_python_sdk/tests/test_activity_details.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def test_set_address_to_be_formatted_address():
345345
assert config.ATTRIBUTE_POSTAL_ADDRESS not in activity_details.user_profile
346346
assert config.ATTRIBUTE_POSTAL_ADDRESS not in activity_details.profile
347347

348-
ActivityDetails.set_address_to_be_formatted_address_if_null(activity_details, None)
348+
ActivityDetails.ensure_postal_address(activity_details, None)
349349

350350
assert activity_details.user_profile[config.ATTRIBUTE_POSTAL_ADDRESS] == FORMATTED_ADDRESS_VALUE
351351
assert activity_details.profile[config.ATTRIBUTE_POSTAL_ADDRESS].value == FORMATTED_ADDRESS_VALUE

0 commit comments

Comments
 (0)