@@ -134,7 +134,7 @@ def test_try_parse_structured_postal_address_uk():
134
134
COUNTRY_KEY : COUNTRY_VALUE ,
135
135
config .KEY_FORMATTED_ADDRESS : FORMATTED_ADDRESS_VALUE }
136
136
137
- structured_postal_address_json = json .dumps (structured_postal_address )
137
+ structured_postal_address_json = json .dumps (structured_postal_address ). encode ()
138
138
139
139
profile = Profile (create_attribute_list_with_structured_postal_address_field (structured_postal_address_json ))
140
140
@@ -167,9 +167,9 @@ def test_try_parse_structured_postal_address_india():
167
167
COUNTRY_KEY : INDIA_COUNTRY_VALUE ,
168
168
config .KEY_FORMATTED_ADDRESS : INDIA_FORMATTED_ADDRESS_VALUE }
169
169
170
- structured_postal_address_json = json .dumps (structured_postal_address )
170
+ structured_postal_address_bytes = json .dumps (structured_postal_address ). encode ( )
171
171
172
- profile = Profile (create_attribute_list_with_structured_postal_address_field (structured_postal_address_json ))
172
+ profile = Profile (create_attribute_list_with_structured_postal_address_field (structured_postal_address_bytes ))
173
173
174
174
actual_structured_postal_address_profile = profile .profile [
175
175
config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ].value
@@ -200,9 +200,9 @@ def test_try_parse_structured_postal_address_usa():
200
200
COUNTRY_KEY : USA_COUNTRY_VALUE ,
201
201
config .KEY_FORMATTED_ADDRESS : USA_FORMATTED_ADDRESS_VALUE }
202
202
203
- structured_postal_address_json = json .dumps (structured_postal_address )
203
+ structured_postal_address_bytes = json .dumps (structured_postal_address ). encode ( )
204
204
205
- profile = Profile (create_attribute_list_with_structured_postal_address_field (structured_postal_address_json ))
205
+ profile = Profile (create_attribute_list_with_structured_postal_address_field (structured_postal_address_bytes ))
206
206
207
207
actual_structured_postal_address_profile = profile .profile [
208
208
config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ].value
@@ -239,9 +239,9 @@ def test_try_parse_structured_postal_address_nested_json():
239
239
COUNTRY_KEY : COUNTRY_VALUE ,
240
240
config .KEY_FORMATTED_ADDRESS : formatted_address_json }
241
241
242
- structured_postal_address_json = json .dumps (structured_postal_address )
242
+ structured_postal_address_bytes = json .dumps (structured_postal_address ). encode ( )
243
243
244
- profile = Profile (create_attribute_list_with_structured_postal_address_field (structured_postal_address_json ))
244
+ profile = Profile (create_attribute_list_with_structured_postal_address_field (structured_postal_address_bytes ))
245
245
246
246
actual_structured_postal_address_profile = profile .profile [
247
247
config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ].value
@@ -260,9 +260,9 @@ def test_try_parse_structured_postal_address_nested_json():
260
260
261
261
def test_set_address_to_be_formatted_address ():
262
262
structured_postal_address = {config .KEY_FORMATTED_ADDRESS : FORMATTED_ADDRESS_VALUE }
263
- structured_postal_address_json = json .dumps (structured_postal_address )
263
+ structured_postal_address_bytes = json .dumps (structured_postal_address ). encode ( )
264
264
265
- profile = Profile (create_attribute_list_with_structured_postal_address_field (structured_postal_address_json ))
265
+ profile = Profile (create_attribute_list_with_structured_postal_address_field (structured_postal_address_bytes ))
266
266
267
267
assert profile .profile [config .ATTRIBUTE_POSTAL_ADDRESS ].value == FORMATTED_ADDRESS_VALUE
268
268
0 commit comments