SDK-2792-python-add-support-for-retrieving-the-extraction-image-ids-f…#452
Conversation
…ield-from-the-idv-pages
…ield-from-the-idv-pages
|
There was a problem hiding this comment.
Pull request overview
Adds new response fields to the Doc Scan session retrieval models to expose additional metadata returned by the API (extraction image IDs for pages, and process type for breakdown items).
Changes:
- Add
extraction_image_idstoPageResponseand extend tests to validate parsing/defaulting behavior. - Add
processtoBreakdownResponseand extend tests to validate parsing/defaulting behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
yoti_python_sdk/doc_scan/session/retrieve/page_response.py |
Adds extraction_image_ids parsing and accessor on PageResponse. |
yoti_python_sdk/tests/doc_scan/session/retrieve/test_page_response.py |
Adds coverage for PageResponse.extraction_image_ids. |
yoti_python_sdk/doc_scan/session/retrieve/breakdown_response.py |
Adds process parsing and accessor on BreakdownResponse. |
yoti_python_sdk/tests/doc_scan/session/retrieve/test_breakdown_response.py |
Adds coverage for BreakdownResponse.process. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| assert result.sub_check is self.SOME_SUB_CHECK | ||
| assert result.result is self.SOME_RESULT | ||
| assert result.process is self.SOME_PROCESS |
There was a problem hiding this comment.
These assertions use is to compare string values. is checks object identity and can be unreliable for strings (interning is an implementation detail), leading to flaky tests. Use == for value equality here (and ideally for the other string assertions in this test as well).
| assert result.sub_check is self.SOME_SUB_CHECK | |
| assert result.result is self.SOME_RESULT | |
| assert result.process is self.SOME_PROCESS | |
| assert result.sub_check == self.SOME_SUB_CHECK | |
| assert result.result == self.SOME_RESULT | |
| assert result.process == self.SOME_PROCESS |
There was a problem hiding this comment.
Not necessary, this will change previous pattern in code.



Summary
extraction_image_idsproperty toPageResponseto expose which media was used forautomated extraction