Conversation
5bde288
to
adfe166
Compare
+1 |
What happens in the case that there is an attachment which is |
re: #106 (comment) It will (now) use utf-8 to encode. Done in b0b522c. Thanks for catching that. |
I think b0b522c is ok for the JSON case because JSON has to be unicode. |
The Python |
Calling |
Ah ok, thanks for investigating. Would you mind adding a test that uses a text attachment with some other charset, just to validate that the behaviour is as we expect? |
I don't think that there is much upside in creating a test to verify that the Python |
ok +1 |
- Change method signature and make attachment_type argument optional. - Add logic to figure out whether attachment should returned as text, json, or binary. - Add additional get attachment tests
4b4cc98
to
dcdad79
Compare
I still think that the API for with open('attachment', 'w') as f: # will fail if attachment is binary because f expects str not bytes
doc.get_attachment('attachment', write_to=f) I think that a |
Reopening issue #102 as a question and continuing the conversation there. |
What
Fix the Document
get_attachment
method so that it now correctly creates text and binary files as exepected as well as returns text, binary, and json content appropriately.How
attachment_type
method argument optional.write_to
argument is provided.Testing
Reviewers
reviewer: @emlaver
reviewer: @ricellis
Issues