-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Implement testparameter endpoints #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ewuerger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't mean to find so many things. After resolving them I would write:
LGTM.
| assert len(items) == 1 | ||
| assert isinstance( | ||
| items[0].scope, dm.TestRecord | ||
| ), "For parameters of TestRecords the scope must be a TestRecord" | ||
| response = delete_test_record_test_parameter.sync_detailed( | ||
| self._project_id, | ||
| items[0].scope.test_run_id, | ||
| items[0].scope.work_item_project_id, | ||
| items[0].scope.work_item_id, | ||
| str(items[0].scope.iteration), | ||
| items[0].name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| assert len(items) == 1 | |
| assert isinstance( | |
| items[0].scope, dm.TestRecord | |
| ), "For parameters of TestRecords the scope must be a TestRecord" | |
| response = delete_test_record_test_parameter.sync_detailed( | |
| self._project_id, | |
| items[0].scope.test_run_id, | |
| items[0].scope.work_item_project_id, | |
| items[0].scope.work_item_id, | |
| str(items[0].scope.iteration), | |
| items[0].name, | |
| assert len(items) == 1 | |
| test_parameter = items[0] | |
| assert isinstance( | |
| test_parameter.scope, dm.TestRecord | |
| ), "For parameters of TestRecords the scope must be a TestRecord" | |
| response = delete_test_record_test_parameter.sync_detailed( | |
| self._project_id, | |
| test_parameter.scope.test_run_id, | |
| test_parameter.scope.work_item_project_id, | |
| test_parameter.scope.work_item_id, | |
| str(test_parameter.scope.iteration), | |
| test_parameter.name, |
Better readability.
ewuerger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last suggestion.
| def _delete(self, items: list[dm.TestParameter]): | ||
| assert len(items) == 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| def _delete(self, items: list[dm.TestParameter]): | |
| assert len(items) == 1 | |
| def _delete(self, items: list[dm.TestParameter]): | |
| """Delete a single test parameter.""" | |
| assert len(items) == 1 |
ewuerger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
No description provided.