We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b588a2 commit 34fb258Copy full SHA for 34fb258
yoti_python_sdk/document_details.py
@@ -27,8 +27,8 @@ def issuing_authority(self):
27
return self.__dict__.get("_DocumentDetails__issuing_authority", None)
28
29
def __parse_data(self, data):
30
- data = data.split()
31
- if len(data) < 3:
+ data = data.split(" ")
+ if len(data) < 3 or "" in data:
32
raise ValueError("Invalid value for DocumentDetails")
33
34
self.__document_type = data[0]
yoti_python_sdk/tests/test_document_details.py
@@ -125,7 +125,7 @@ def test_invalid_date():
125
126
127
def test_should_fail_with_double_space():
128
- DATA = " IND ****1234"
+ DATA = "AADHAAR IND ****1234"
129
130
with pytest.raises(ValueError) as exc:
131
DocumentDetails(DATA)
0 commit comments