Skip to content

Commit 2b588a2

Browse files
committed
SDK-1443: Modify empty string test to demonstrate a failure case
1 parent 872b205 commit 2b588a2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

yoti_python_sdk/tests/test_document_details.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,9 @@ def test_invalid_date():
124124
assert str(exc.value) == "Invalid value for DocumentDetails"
125125

126126

127-
def test_should_parse_with_double_space():
128-
DATA = "AADHAAR IND ****1234"
127+
def test_should_fail_with_double_space():
128+
DATA = " IND ****1234"
129129

130-
document = DocumentDetails(DATA)
131-
132-
assert document.document_type == "AADHAAR"
133-
assert document.document_number == "****1234"
130+
with pytest.raises(ValueError) as exc:
131+
DocumentDetails(DATA)
132+
assert str(exc.value) == "Invalid value for DocumentDetails"

0 commit comments

Comments
 (0)