Skip to content

Commit c3af919

Browse files
committed
SDK-1229: Fix compatibility issue with byte encoding in python2
1 parent 5aae2a9 commit c3af919

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

yoti_python_sdk/tests/share/test_extra_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def create_third_party_test_data(token_value, expiry_date, *definitions):
2525
issuing_attributes.definitions.extend([name])
2626

2727
attribute = ThirdPartyAttribute_pb2.ThirdPartyAttribute()
28-
attribute.issuance_token = bytes(token_value, "utf-8")
28+
attribute.issuance_token = str(token_value).encode("utf-8")
2929
attribute.issuing_attributes.MergeFrom(issuing_attributes)
3030

3131
data_entry = DataEntry_pb2.DataEntry()

yoti_python_sdk/tests/test_issuance_details.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def create_issuance_test_proto(issuance_token, expiry_date, *definitions):
2121
issuing_attributes.definitions.extend([name])
2222

2323
attribute = ThirdPartyAttribute_pb2.ThirdPartyAttribute()
24-
attribute.issuance_token = bytes(issuance_token, "utf-8")
24+
attribute.issuance_token = str(issuance_token).encode("utf-8")
2525
attribute.issuing_attributes.MergeFrom(issuing_attributes)
2626
return attribute
2727

0 commit comments

Comments
 (0)