1
1
# -*- coding: utf-8 -*-
2
+ import collections
2
3
import json
3
4
4
- import collections
5
5
import pytest
6
6
7
7
from yoti_python_sdk import config
@@ -146,7 +146,8 @@ def test_try_parse_structured_postal_address_uk():
146
146
147
147
ActivityDetails .try_convert_structured_postal_address_to_dict (activity_details , activity_details .field , None )
148
148
149
- actual_structured_postal_address_user_profile = activity_details .user_profile [config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ]
149
+ actual_structured_postal_address_user_profile = activity_details .user_profile [
150
+ config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ]
150
151
151
152
assert type (actual_structured_postal_address_user_profile ) is collections .OrderedDict
152
153
assert actual_structured_postal_address_user_profile [ADDRESS_FORMAT_KEY ] == ADDRESS_FORMAT_VALUE
@@ -158,7 +159,8 @@ def test_try_parse_structured_postal_address_uk():
158
159
assert actual_structured_postal_address_user_profile [COUNTRY_KEY ] == COUNTRY_VALUE
159
160
assert actual_structured_postal_address_user_profile [FORMATTED_ADDRESS_KEY ] == FORMATTED_ADDRESS_VALUE
160
161
161
- actual_structured_postal_address_profile = activity_details .profile [config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ].get_value ()
162
+ actual_structured_postal_address_profile = activity_details .profile [
163
+ config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ].get_value ()
162
164
163
165
assert type (actual_structured_postal_address_profile ) is collections .OrderedDict
164
166
assert actual_structured_postal_address_profile [ADDRESS_FORMAT_KEY ] == ADDRESS_FORMAT_VALUE
@@ -193,7 +195,8 @@ def test_try_parse_structured_postal_address_india():
193
195
194
196
ActivityDetails .try_convert_structured_postal_address_to_dict (activity_details , activity_details .field , None )
195
197
196
- actual_structured_postal_address_user_profile = activity_details .user_profile [config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ]
198
+ actual_structured_postal_address_user_profile = activity_details .user_profile [
199
+ config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ]
197
200
198
201
assert type (actual_structured_postal_address_user_profile ) is collections .OrderedDict
199
202
assert actual_structured_postal_address_user_profile [ADDRESS_FORMAT_KEY ] == INDIA_FORMAT_VALUE
@@ -210,7 +213,8 @@ def test_try_parse_structured_postal_address_india():
210
213
assert actual_structured_postal_address_user_profile [COUNTRY_KEY ] == INDIA_COUNTRY_VALUE
211
214
assert actual_structured_postal_address_user_profile [FORMATTED_ADDRESS_KEY ] == INDIA_FORMATTED_ADDRESS_VALUE
212
215
213
- actual_structured_postal_address_profile = activity_details .profile [config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ].get_value ()
216
+ actual_structured_postal_address_profile = activity_details .profile [
217
+ config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ].get_value ()
214
218
215
219
assert type (actual_structured_postal_address_profile ) is collections .OrderedDict
216
220
assert actual_structured_postal_address_profile [ADDRESS_FORMAT_KEY ] == INDIA_FORMAT_VALUE
@@ -245,7 +249,8 @@ def test_try_parse_structured_postal_address_usa():
245
249
246
250
ActivityDetails .try_convert_structured_postal_address_to_dict (activity_details , activity_details .field , None )
247
251
248
- actual_structured_postal_address_user_profile = activity_details .user_profile [config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ]
252
+ actual_structured_postal_address_user_profile = activity_details .user_profile [
253
+ config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ]
249
254
250
255
assert type (actual_structured_postal_address_user_profile ) is collections .OrderedDict
251
256
assert actual_structured_postal_address_user_profile [ADDRESS_FORMAT_KEY ] == USA_FORMAT_VALUE
@@ -257,7 +262,8 @@ def test_try_parse_structured_postal_address_usa():
257
262
assert actual_structured_postal_address_user_profile [COUNTRY_KEY ] == USA_COUNTRY_VALUE
258
263
assert actual_structured_postal_address_user_profile [FORMATTED_ADDRESS_KEY ] == USA_FORMATTED_ADDRESS_VALUE
259
264
260
- actual_structured_postal_address_profile = activity_details .profile [config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ].get_value ()
265
+ actual_structured_postal_address_profile = activity_details .profile [
266
+ config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ].get_value ()
261
267
262
268
assert type (actual_structured_postal_address_profile ) is collections .OrderedDict
263
269
assert actual_structured_postal_address_profile [ADDRESS_FORMAT_KEY ] == USA_FORMAT_VALUE
@@ -298,7 +304,8 @@ def test_try_parse_structured_postal_address_nested_json():
298
304
299
305
ActivityDetails .try_convert_structured_postal_address_to_dict (activity_details , activity_details .field , None )
300
306
301
- actual_structured_postal_address_user_profile = activity_details .user_profile [config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ]
307
+ actual_structured_postal_address_user_profile = activity_details .user_profile [
308
+ config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ]
302
309
303
310
assert type (actual_structured_postal_address_user_profile ) is collections .OrderedDict
304
311
assert actual_structured_postal_address_user_profile [ADDRESS_FORMAT_KEY ] == ADDRESS_FORMAT_VALUE
@@ -311,7 +318,8 @@ def test_try_parse_structured_postal_address_nested_json():
311
318
312
319
assert actual_structured_postal_address_user_profile [FORMATTED_ADDRESS_KEY ] == formatted_address_json
313
320
314
- actual_structured_postal_address_profile = activity_details .profile [config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ].get_value ()
321
+ actual_structured_postal_address_profile = activity_details .profile [
322
+ config .ATTRIBUTE_STRUCTURED_POSTAL_ADDRESS ].get_value ()
315
323
316
324
assert type (actual_structured_postal_address_profile ) is collections .OrderedDict
317
325
assert actual_structured_postal_address_profile [ADDRESS_FORMAT_KEY ] == ADDRESS_FORMAT_VALUE
0 commit comments