Skip to content

Commit 54f25af

Browse files
committed
SDK-1565: Fix default Doc Scan API URL in client
1 parent e52b149 commit 54f25af

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

yoti_python_sdk/doc_scan/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, sdk_id, key, api_url=None):
2929
if api_url is not None:
3030
self.__api_url = api_url
3131
else:
32-
self.__api_url = yoti_python_sdk.YOTI_DOC_SCAN_ENDPOINT
32+
self.__api_url = yoti_python_sdk.YOTI_DOC_SCAN_API_URL
3333

3434
def create_session(self, session_spec):
3535
"""

yoti_python_sdk/tests/doc_scan/test_doc_scan_client.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,10 @@ def test_should_throw_exception_for_delete_media(_, doc_scan_client):
154154
doc_scan_exception = ex.value # type: DocScanException
155155
assert "Failed to delete media content" in str(doc_scan_exception)
156156
assert 404 == doc_scan_exception.status_code
157+
158+
159+
def test_should_use_correct_default_api_url(doc_scan_client):
160+
assert (
161+
doc_scan_client._DocScanClient__api_url
162+
== "https://api.yoti.com:443/idverify/v1"
163+
) # noqa

0 commit comments

Comments
 (0)