-
Notifications
You must be signed in to change notification settings - Fork 4
DEVEXP-503 Can now read a batch of documents with metadata #12
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
ebc62c0 to
30e2ebf
Compare
| URI. By default, only content will be returned for each URI. See the endpoint | ||
| documentation for further information. | ||
| """ | ||
| response = self._get_multipart_documents_response(uris, categories, **kwargs) |
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.
Would it be helpful if to return the response code if the URI isn't found?
What if there's a network or authentication error?
With Python, is it generally assumed that the user of these functions will do their own error handling?
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.
Good point. I'll add a test user that lacks the "rest-reader" role and thus will get a 4xx, and I'll add a test to verify that it's returned.
So I think that will change the method signature to return either a list[Document] or a Response.
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.
No longer need this now that we have a real "read" capability.
| URI. By default, only content will be returned for each URI. See the endpoint | ||
| documentation for further information. | ||
| """ | ||
| response = self._get_multipart_documents_response(uris, categories, **kwargs) |
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.
Good point. I'll add a test user that lacks the "rest-reader" role and thus will get a 4xx, and I'll add a test to verify that it's returned.
So I think that will change the method signature to return either a list[Document] or a Response.
Reworked some of the existing "write" tests to now use `client.documents.read` to verify data that was written.
30e2ebf to
305de78
Compare
| assert {"hello": "world"} == doc.content | ||
|
|
||
|
|
||
| def test_not_rest_user(not_rest_user_client: Client): |
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.
@BillFarber Added this test for a non-200 response.
Reworked some of the existing "write" tests to now use
client.documents.readto verify data that was written.