SDK-2743-python-expose-idv-breakdown-process-property#453
SDK-2743-python-expose-idv-breakdown-process-property#453mehmet-yoti wants to merge 1 commit intodevelopmentfrom
Conversation
|
There was a problem hiding this comment.
Pull request overview
Adds support in the Doc Scan session retrieval models to expose the breakdown “process” type (e.g., AUTOMATED / EXPERT_REVIEW) via BreakdownResponse.process, including test coverage for presence/absence.
Changes:
- Parse
processfrom breakdown response payloads and store it onBreakdownResponse. - Add
processproperty accessor toBreakdownResponse. - Extend breakdown response unit tests to validate
processand its default ofNone.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
yoti_python_sdk/doc_scan/session/retrieve/breakdown_response.py |
Adds process parsing and exposes it via a new process property. |
yoti_python_sdk/tests/doc_scan/session/retrieve/test_breakdown_response.py |
Updates tests to assert process is parsed and defaults to None when absent. |
💡 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 for string comparison. is checks object identity and can be flaky depending on interning; use == for comparing the returned string values (sub_check, result, process). Keep is None only for None checks.
| 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 |
| def process(self): | ||
| """ | ||
| The process of the sub check | ||
|
|
||
| :return: the process | ||
| :rtype: str or None | ||
| """ |
There was a problem hiding this comment.
Docstring for process is a bit unclear relative to the API meaning described in the PR (breakdown process type). Consider updating it to explicitly state this is the breakdown process type (e.g., AUTOMATED / EXPERT_REVIEW) and use consistent terminology ("sub-check" vs "sub check").



Summary
processproperty toBreakdownResponseto expose the breakdown process type(AUTOMATED / EXPERT_REVIEW)